cmdx-rspec 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d7e467dfe5e14a9de4e6e0b2f0dc11103b2f7da3950520cd94ffed429b0eef6
4
- data.tar.gz: 0b6af1c86e14a62c8d3a4244576b5805c667788b81e276ca3e89ab03e9f293a9
3
+ metadata.gz: 65acfca8209e73048a17abf0bc8c9b260904be2d222eb8d2f620c39452da0d0b
4
+ data.tar.gz: 64c7756f01efe07324193ca891bf4ce841361e2ce93235437b0a63ed4c74bfea
5
5
  SHA512:
6
- metadata.gz: 338465ba22c6e888adbf36f973fc56479ec58b8fb2bb3635f3c028fa02783e90fbb408d68d4399a0cb9515e7ad6bbbd6e7e1da549af2ac7258abdf87c4208b31
7
- data.tar.gz: dd456ab9cb4c907272fc8813e93d18cae68d85f09e2a2f7cc8e019a156d7911a7f99e7a267215d98cec4b0800248d4294ddf5471e1df1832fbb7629875eb38e3
6
+ metadata.gz: e05b1817afbfacd6d8fca1bf97b3f1b94ba9fdff4ab9acbb089655641430cc636efd9a60cdadc506d347ab58b907b7b11e3991eff22655a24b5b7c5660599d75
7
+ data.tar.gz: 5b37bad356a2973d7ab0030afe938a8baa2b8a86d62a769e1ecd9bc7ffa31c5aa424b24016b14cb564e4e5db48c10b7dfce58dfbc626a81666212ae3b77923aa
data/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.2.0] - 2025-11-08
10
+
11
+ ### Added
12
+ - Added unmock helpers
13
+
9
14
  ## [1.1.0] - 2025-11-08
10
15
 
11
16
  ### Added
data/README.md CHANGED
@@ -261,6 +261,16 @@ it "mocks task with arguments" do
261
261
 
262
262
  # Your specs...
263
263
  end
264
+
265
+ it "mocks no task executions by type" do
266
+ # eg: SomeTask.execute
267
+ expect_no_task_execution(SomeTask)
268
+
269
+ # eg: SomeTask.execute!
270
+ expect_no_task_execution!(SomeTask)
271
+
272
+ # Your specs...
273
+ end
264
274
  ```
265
275
 
266
276
  ## Development
@@ -281,6 +281,34 @@ module CMDx
281
281
  end
282
282
  end
283
283
 
284
+ # Sets up an expectation that a command will not receive :execute.
285
+ #
286
+ # @param command [Class] The command class to expect execution on
287
+ #
288
+ # @return [RSpec::Mocks::MessageExpectation] The RSpec expectation object
289
+ #
290
+ # @example Expecting no execution
291
+ # expect_no_task_execution(MyCommand)
292
+ #
293
+ # MyCommand.execute
294
+ def expect_no_task_execution(command)
295
+ expect(command).not_to receive(:execute)
296
+ end
297
+
298
+ # Sets up an expectation that a command will not receive :execute!.
299
+ #
300
+ # @param command [Class] The command class to expect execution on
301
+ #
302
+ # @return [RSpec::Mocks::MessageExpectation] The RSpec expectation object
303
+ #
304
+ # @example Expecting no execution!
305
+ # expect_no_task_execution!(MyCommand)
306
+ #
307
+ # MyCommand.execute!
308
+ def expect_no_task_execution!(command)
309
+ expect(command).not_to receive(:execute!)
310
+ end
311
+
284
312
  end
285
313
  end
286
314
  end
@@ -3,7 +3,7 @@
3
3
  module CMDx
4
4
  module RSpec
5
5
 
6
- VERSION = "1.1.0"
6
+ VERSION = "1.2.0"
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmdx-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez