rspec-isolate 0.1.0 → 0.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
- SHA256:
3
- metadata.gz: 38f6bcba6069b5db43b22ff776bf3de66c1f021e90ea43cc7673719f303d3276
4
- data.tar.gz: a33f72a23c62b8ac69c14750392219b39412d38290e8ed979cdbe99b03329cce
2
+ SHA1:
3
+ metadata.gz: c3b2dafd8befd20237938c2cca2e3e4196d7e76b
4
+ data.tar.gz: c791c7a3165422991487ca5a914aa4b2fd5b331c
5
5
  SHA512:
6
- metadata.gz: 8432832d6bdeabaa033e87e7b793dbabea13a6cbc861f5980f7362cc18baa37682417d431b9d6e85ce02c1a902e69294c2f5966109a3c9231c737ca1662396dc
7
- data.tar.gz: ed21fd273f9d54a13f9a99ced770f3b34932984dc5e1020d22d24f8cfd667c6c19ff76ac33f590d28bf9ee0a7c44779d3ad505a3f88d68e3c369dabed3d5a276
6
+ metadata.gz: 7413302bc2575ca2307cee59f85b5e35c97f1ea23989c66ed057bd982329157e9d549bda5c5e5c902b06f8c908556dae66235801b91a6fd6fe1b93a6e934c010
7
+ data.tar.gz: eb95966bbc62298ca182f8b94467e92ea400a68b2bc1af6e6b4be615669be023ad411e04e5c3bb3a86230a107e068440579ab7c9c90e79ef7be6c9d43587ce7b
data/README.md CHANGED
@@ -32,13 +32,13 @@ require 'rspec/isolate'
32
32
  Add a tag to your describe block as below.
33
33
 
34
34
  ```ruby
35
- RSpec.describe ClassUnderTest, throw_on_call: [ CollaboratorClassOne, CollaboratorClassTwo ] do
35
+ RSpec.describe ClassUnderTest, error_on_call: [ CollaboratorClassOne, CollaboratorClassTwo ] do
36
36
  # Calling any method on `CollaboratorClassOne` and `CollaboratorClassTwo` in
37
- # the course of this test suite will throw an error.
37
+ # the course of this test suite will raise an error.
38
38
  end
39
39
  ```
40
40
 
41
- Or, if you prefer warnings to errors:
41
+ Or, if you prefer warnings to errors.
42
42
 
43
43
  ```ruby
44
44
  RSpec.describe ClassUnderTest, warn_on_call: [ CollaboratorClassOne, CollaboratorClassTwo ] do
@@ -80,7 +80,7 @@ end
80
80
 
81
81
  # spec/statement_formatter.rb
82
82
 
83
- RSpec.describe StatementFormatter, isolate: [ TransactionFormatter ] do
83
+ RSpec.describe StatementFormatter, error_on_call: [ TransactionFormatter ] do
84
84
  describe "#format" do
85
85
 
86
86
  # This will fail, as `StatementFormatter` will call `TransactionFormatter`
@@ -1,13 +1,13 @@
1
1
  require "rspec/isolate/version"
2
- require "rspec/isolate/throw_on_call"
2
+ require "rspec/isolate/error_on_call"
3
3
  require "rspec/isolate/warn_on_call"
4
4
  require "rspec/isolate/constant_replacer"
5
5
  require "rspec/core"
6
6
 
7
7
  RSpec.configure do |config|
8
- config.around :example, :throw_on_call do |example|
9
- klass_constants = example.metadata[:throw_on_call]
10
- ConstantReplacer.replace(klass_constants, &ThrowOnCall.method(:new))
8
+ config.around :example, :error_on_call do |example|
9
+ klass_constants = example.metadata[:error_on_call]
10
+ ConstantReplacer.replace(klass_constants, &ErrorOnCall.method(:new))
11
11
  example.run
12
12
  ConstantReplacer.replace(klass_constants, &:itself)
13
13
  end
@@ -1,4 +1,4 @@
1
- class ThrowOnCall
1
+ class ErrorOnCall
2
2
  def initialize(klass)
3
3
  @klass = klass
4
4
  end
@@ -1,5 +1,5 @@
1
1
  module Rspec
2
2
  module Isolate
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-isolate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kay Lack
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-24 00:00:00.000000000 Z
11
+ date: 2018-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -70,7 +70,7 @@ files:
70
70
  - bin/setup
71
71
  - lib/rspec/isolate.rb
72
72
  - lib/rspec/isolate/constant_replacer.rb
73
- - lib/rspec/isolate/throw_on_call.rb
73
+ - lib/rspec/isolate/error_on_call.rb
74
74
  - lib/rspec/isolate/version.rb
75
75
  - lib/rspec/isolate/warn_on_call.rb
76
76
  - rspec-isolate.gemspec
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.7.3
97
+ rubygems_version: 2.6.8
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Enforce isolation in your unit tests.