rspec-mocks 3.0.0.beta1 → 3.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +1 -1
- data/Changelog.md +95 -3
- data/README.md +27 -13
- data/features/README.md +15 -7
- data/features/argument_matchers/README.md +5 -5
- data/features/argument_matchers/explicit.feature +6 -6
- data/features/argument_matchers/general_matchers.feature +4 -4
- data/features/argument_matchers/type_matchers.feature +2 -2
- data/features/message_expectations/README.md +29 -27
- data/features/message_expectations/call_original.feature +0 -1
- data/features/message_expectations/message_chains_using_expect.feature +49 -0
- data/features/method_stubs/README.md +2 -1
- data/features/method_stubs/{any_instance.feature → allow_any_instance_of.feature} +12 -12
- data/features/method_stubs/{stub_chain.feature → receive_message_chain.feature} +3 -3
- data/features/method_stubs/to_ary.feature +1 -1
- data/features/mutating_constants/stub_defined_constant.feature +0 -1
- data/features/outside_rspec/standalone.feature +1 -1
- data/features/spies/spy_pure_mock_method.feature +1 -1
- data/features/test_frameworks/test_unit.feature +21 -10
- data/features/verifying_doubles/README.md +17 -0
- data/features/verifying_doubles/class_doubles.feature +1 -16
- data/features/verifying_doubles/dynamic_classes.feature +0 -1
- data/features/verifying_doubles/{introduction.feature → instance_doubles.feature} +41 -23
- data/features/verifying_doubles/partial_doubles.feature +2 -2
- data/lib/rspec/mocks.rb +69 -82
- data/lib/rspec/mocks/any_instance/expect_chain_chain.rb +35 -0
- data/lib/rspec/mocks/any_instance/expectation_chain.rb +1 -2
- data/lib/rspec/mocks/any_instance/recorder.rb +52 -18
- data/lib/rspec/mocks/any_instance/stub_chain.rb +1 -1
- data/lib/rspec/mocks/any_instance/stub_chain_chain.rb +4 -0
- data/lib/rspec/mocks/argument_list_matcher.rb +10 -44
- data/lib/rspec/mocks/argument_matchers.rb +132 -163
- data/lib/rspec/mocks/configuration.rb +28 -4
- data/lib/rspec/mocks/error_generator.rb +46 -13
- data/lib/rspec/mocks/example_methods.rb +13 -12
- data/lib/rspec/mocks/extensions/marshal.rb +1 -1
- data/lib/rspec/mocks/framework.rb +3 -4
- data/lib/rspec/mocks/instance_method_stasher.rb +2 -3
- data/lib/rspec/mocks/matchers/have_received.rb +8 -6
- data/lib/rspec/mocks/matchers/receive.rb +28 -20
- data/lib/rspec/mocks/matchers/receive_message_chain.rb +65 -0
- data/lib/rspec/mocks/matchers/receive_messages.rb +3 -2
- data/lib/rspec/mocks/message_chain.rb +91 -0
- data/lib/rspec/mocks/message_expectation.rb +86 -80
- data/lib/rspec/mocks/method_double.rb +2 -11
- data/lib/rspec/mocks/method_reference.rb +82 -23
- data/lib/rspec/mocks/method_signature_verifier.rb +207 -0
- data/lib/rspec/mocks/mutate_const.rb +34 -50
- data/lib/rspec/mocks/object_reference.rb +0 -1
- data/lib/rspec/mocks/proxy.rb +70 -13
- data/lib/rspec/mocks/ruby_features.rb +24 -0
- data/lib/rspec/mocks/space.rb +105 -31
- data/lib/rspec/mocks/standalone.rb +2 -2
- data/lib/rspec/mocks/syntax.rb +43 -8
- data/lib/rspec/mocks/targets.rb +16 -7
- data/lib/rspec/mocks/test_double.rb +41 -15
- data/lib/rspec/mocks/verifying_double.rb +51 -4
- data/lib/rspec/mocks/verifying_message_expecation.rb +12 -12
- data/lib/rspec/mocks/verifying_proxy.rb +32 -19
- data/lib/rspec/mocks/version.rb +1 -1
- data/spec/rspec/mocks/and_call_original_spec.rb +28 -7
- data/spec/rspec/mocks/and_return_spec.rb +23 -0
- data/spec/rspec/mocks/and_yield_spec.rb +1 -2
- data/spec/rspec/mocks/any_instance_spec.rb +33 -17
- data/spec/rspec/mocks/array_including_matcher_spec.rb +6 -6
- data/spec/rspec/mocks/before_all_spec.rb +132 -0
- data/spec/rspec/mocks/block_return_value_spec.rb +12 -1
- data/spec/rspec/mocks/combining_implementation_instructions_spec.rb +9 -11
- data/spec/rspec/mocks/configuration_spec.rb +14 -1
- data/spec/rspec/mocks/double_spec.rb +867 -24
- data/spec/rspec/mocks/example_methods_spec.rb +13 -0
- data/spec/rspec/mocks/extensions/marshal_spec.rb +17 -17
- data/spec/rspec/mocks/failing_argument_matchers_spec.rb +29 -1
- data/spec/rspec/mocks/hash_excluding_matcher_spec.rb +12 -12
- data/spec/rspec/mocks/hash_including_matcher_spec.rb +21 -17
- data/spec/rspec/mocks/instance_method_stasher_spec.rb +2 -3
- data/spec/rspec/mocks/matchers/have_received_spec.rb +7 -0
- data/spec/rspec/mocks/matchers/receive_message_chain_spec.rb +198 -0
- data/spec/rspec/mocks/matchers/receive_messages_spec.rb +2 -2
- data/spec/rspec/mocks/matchers/receive_spec.rb +19 -6
- data/spec/rspec/mocks/method_signature_verifier_spec.rb +272 -0
- data/spec/rspec/mocks/methods_spec.rb +0 -1
- data/spec/rspec/mocks/multiple_return_value_spec.rb +2 -2
- data/spec/rspec/mocks/mutate_const_spec.rb +24 -1
- data/spec/rspec/mocks/nil_expectation_warning_spec.rb +6 -22
- data/spec/rspec/mocks/null_object_mock_spec.rb +13 -7
- data/spec/rspec/mocks/options_hash_spec.rb +3 -3
- data/spec/rspec/mocks/{partial_mock_spec.rb → partial_double_spec.rb} +5 -2
- data/spec/rspec/mocks/{partial_mock_using_mocks_directly_spec.rb → partial_double_using_mocks_directly_spec.rb} +1 -1
- data/spec/rspec/mocks/passing_argument_matchers_spec.rb +18 -0
- data/spec/rspec/mocks/serialization_spec.rb +1 -0
- data/spec/rspec/mocks/space_spec.rb +218 -7
- data/spec/rspec/mocks/stub_chain_spec.rb +6 -0
- data/spec/rspec/mocks/stub_spec.rb +0 -6
- data/spec/rspec/mocks/syntax_spec.rb +19 -0
- data/spec/rspec/mocks/test_double_spec.rb +0 -1
- data/spec/rspec/mocks/verifying_double_spec.rb +281 -18
- data/spec/rspec/mocks/verifying_message_expecation_spec.rb +7 -6
- data/spec/rspec/mocks_spec.rb +168 -42
- data/spec/spec_helper.rb +34 -22
- metadata +94 -63
- metadata.gz.sig +0 -0
- checksums.yaml +0 -15
- checksums.yaml.gz.sig +0 -2
- data/features/outside_rspec/configuration.feature +0 -60
- data/lib/rspec/mocks/arity_calculator.rb +0 -66
- data/lib/rspec/mocks/errors.rb +0 -12
- data/lib/rspec/mocks/mock.rb +0 -7
- data/lib/rspec/mocks/proxy_for_nil.rb +0 -37
- data/lib/rspec/mocks/stub_chain.rb +0 -51
- data/spec/rspec/mocks/argument_expectation_spec.rb +0 -32
- data/spec/rspec/mocks/arity_calculator_spec.rb +0 -95
- data/spec/rspec/mocks/mock_space_spec.rb +0 -113
- data/spec/rspec/mocks/mock_spec.rb +0 -788
@@ -21,18 +21,19 @@ module RSpec
|
|
21
21
|
|
22
22
|
describe 'when arity match fails' do
|
23
23
|
it 'raises error' do
|
24
|
+
args = ["abc123", "xyz987"]
|
24
25
|
subject.method_reference = InstanceMethodReference.new(string_module_reference, :replace)
|
25
|
-
expect(error_generator).to receive(:
|
26
|
-
with(instance_of(
|
26
|
+
expect(error_generator).to receive(:raise_invalid_arguments_error).
|
27
|
+
with(instance_of(MethodSignatureVerifier))
|
27
28
|
|
28
|
-
subject.with(
|
29
|
+
subject.with(*args)
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
32
33
|
describe 'when called with arguments' do
|
33
34
|
it 'matches arity against the number of arguments' do
|
34
35
|
subject.method_reference = InstanceMethodReference.new(string_module_reference, :replace)
|
35
|
-
expect(error_generator).not_to receive(:
|
36
|
+
expect(error_generator).not_to receive(:raise_invalid_arguments_error)
|
36
37
|
|
37
38
|
subject.with("abc123")
|
38
39
|
end
|
@@ -48,8 +49,8 @@ module RSpec
|
|
48
49
|
describe 'when called with no arguments matcher' do
|
49
50
|
it 'matches arity to 0' do
|
50
51
|
subject.method_reference = InstanceMethodReference.new(string_module_reference, :replace)
|
51
|
-
expect(error_generator).to receive(:
|
52
|
-
with(instance_of(
|
52
|
+
expect(error_generator).to receive(:raise_invalid_arguments_error).
|
53
|
+
with(instance_of(MethodSignatureVerifier))
|
53
54
|
|
54
55
|
subject.with(no_args)
|
55
56
|
end
|
data/spec/rspec/mocks_spec.rb
CHANGED
@@ -1,51 +1,50 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe RSpec::Mocks do
|
4
|
-
describe "
|
5
|
-
context "with an existing Mock::Space" do
|
6
|
-
before do
|
7
|
-
@orig_space = RSpec::Mocks::space
|
8
|
-
end
|
9
|
-
|
10
|
-
after do
|
11
|
-
RSpec::Mocks::space = @orig_space
|
12
|
-
end
|
13
|
-
|
14
|
-
it "memoizes the space" do
|
15
|
-
RSpec::Mocks::setup(Object.new)
|
16
|
-
space = RSpec::Mocks::space
|
17
|
-
RSpec::Mocks::setup(Object.new)
|
18
|
-
expect(RSpec::Mocks::space).to equal(space)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
context "with no pre-existing Mock::Space" do
|
23
|
-
it "initializes a Mock::Space" do
|
24
|
-
RSpec::Mocks::space = nil
|
25
|
-
RSpec::Mocks::setup(Object.new)
|
26
|
-
expect(RSpec::Mocks::space).not_to be_nil
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe "::verify" do
|
4
|
+
describe ".verify" do
|
32
5
|
it "delegates to the space" do
|
33
6
|
foo = double
|
34
7
|
foo.should_receive(:bar)
|
35
8
|
expect do
|
36
|
-
RSpec::Mocks
|
9
|
+
RSpec::Mocks.verify
|
37
10
|
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
11
|
+
|
12
|
+
RSpec::Mocks.teardown # so the mocks aren't re-verified after this example
|
38
13
|
end
|
39
14
|
end
|
40
15
|
|
41
|
-
describe "
|
42
|
-
it "
|
43
|
-
|
44
|
-
|
45
|
-
RSpec::Mocks
|
46
|
-
expect
|
47
|
-
|
48
|
-
|
16
|
+
describe ".teardown" do
|
17
|
+
it "resets method stubs" do
|
18
|
+
string = "foo"
|
19
|
+
allow(string).to receive(:bar)
|
20
|
+
RSpec::Mocks.teardown
|
21
|
+
expect { string.bar }.to raise_error(NoMethodError)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "does not put rspec-mocks into an inconsistent state when called extra times" do
|
25
|
+
RSpec::Mocks.teardown
|
26
|
+
RSpec::Mocks.teardown
|
27
|
+
RSpec::Mocks.teardown
|
28
|
+
|
29
|
+
string = "foo"
|
30
|
+
expect { allow(string).to receive(:bar) }.to raise_error(RSpec::Mocks::OutsideOfExampleError)
|
31
|
+
|
32
|
+
RSpec::Mocks.setup
|
33
|
+
allow(string).to receive(:bar).and_return(:baz)
|
34
|
+
expect(string.bar).to eq(:baz)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe ".setup" do
|
39
|
+
it 'starts a new space scope that is later removed by .teardown' do
|
40
|
+
old_space = RSpec::Mocks.space
|
41
|
+
RSpec::Mocks.setup
|
42
|
+
|
43
|
+
new_space = RSpec::Mocks.space
|
44
|
+
expect(new_space).not_to equal(old_space)
|
45
|
+
|
46
|
+
RSpec::Mocks.teardown
|
47
|
+
expect(RSpec::Mocks.space).to equal(old_space)
|
49
48
|
end
|
50
49
|
end
|
51
50
|
|
@@ -56,11 +55,138 @@ describe RSpec::Mocks do
|
|
56
55
|
end
|
57
56
|
end
|
58
57
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
describe ".with_temporary_scope" do
|
59
|
+
context "in a before(:all) with a stubbed double" do
|
60
|
+
before(:all) do
|
61
|
+
RSpec::Mocks.with_temporary_scope do
|
62
|
+
@calculator = double
|
63
|
+
allow(@calculator).to receive(:add) { |a, b| a + b }
|
64
|
+
@sum = @calculator.add(3, 4)
|
65
|
+
end
|
66
|
+
|
67
|
+
capture_error { @calculator.add(1, 10) }
|
68
|
+
end
|
69
|
+
|
70
|
+
it 'allows the stubbed double to be used' do
|
71
|
+
expect(@sum).to eq(7)
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'does not allow the double to be used in the examples' do
|
75
|
+
expect {
|
76
|
+
@calculator.add(1, 2)
|
77
|
+
}.to raise_error(RSpec::Mocks::ExpiredTestDoubleError)
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'does not allow the double to be used after the scope in before(:all)' do
|
81
|
+
expect(@error).to be_a(RSpec::Mocks::OutsideOfExampleError)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
context "in a before(:all) with a stubbed const" do
|
86
|
+
before(:all) do
|
87
|
+
RSpec::Mocks.with_temporary_scope do
|
88
|
+
stub_const("ValueX", 3)
|
89
|
+
stub_const("ValueY", 4)
|
90
|
+
@sum = ValueX + ValueY
|
91
|
+
end
|
92
|
+
|
93
|
+
capture_error { ValueX + ValueY }
|
94
|
+
end
|
95
|
+
|
96
|
+
it 'allows the stubbed constants to be used' do
|
97
|
+
expect(@sum).to eq(7)
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'does not allow the stubbed constants to be used in the examples' do
|
101
|
+
expect(defined?(ValueX)).to be_falsey
|
102
|
+
expect(defined?(ValueY)).to be_falsey
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'does not allow the stubbed constants to be used after the scope in before(:all)' do
|
106
|
+
expect(@error).to be_a(NameError)
|
107
|
+
expect(@error.message).to include("ValueX")
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
context "in a before(:all) with a unmet mock expectation" do
|
112
|
+
before(:all) do
|
113
|
+
capture_error do
|
114
|
+
RSpec::Mocks.with_temporary_scope do
|
115
|
+
calculator = double
|
116
|
+
expect(calculator).to receive(:add)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
it 'fails with a mock expectation error' do
|
122
|
+
expect(@error).to be_a(RSpec::Mocks::MockExpectationError)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
context "in a before(:all) with an any_instance stub" do
|
127
|
+
before(:all) do
|
128
|
+
RSpec::Mocks.with_temporary_scope do
|
129
|
+
allow_any_instance_of(String).to receive(:sum_with) { |val, x| val + x }
|
130
|
+
@sum = "foo".sum_with("bar")
|
131
|
+
end
|
132
|
+
|
133
|
+
capture_error { "you".sum_with("me") }
|
134
|
+
end
|
135
|
+
|
136
|
+
it 'allows the stub to be used' do
|
137
|
+
expect(@sum).to eq("foobar")
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'does not allow the double to be used in the examples' do
|
141
|
+
expect {
|
142
|
+
"foo".sum_with("baz")
|
143
|
+
}.to raise_error(NameError, /sum_with/)
|
144
|
+
end
|
145
|
+
|
146
|
+
it 'does not allow the double to be used after the scope in before(:all)' do
|
147
|
+
expect(@error).to be_a(NameError)
|
148
|
+
expect(@error.message).to include("sum_with")
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
it 'tears down even if an error occurs' do
|
153
|
+
foo = Object.new
|
154
|
+
|
155
|
+
expect {
|
156
|
+
RSpec::Mocks.with_temporary_scope do
|
157
|
+
allow(foo).to receive(:bar)
|
158
|
+
raise "boom"
|
159
|
+
end
|
160
|
+
}.to raise_error("boom")
|
161
|
+
|
162
|
+
expect(foo).not_to respond_to(:bar)
|
163
|
+
end
|
164
|
+
|
165
|
+
it 'does not verify if an error occurs before the block completes' do
|
166
|
+
expect {
|
167
|
+
RSpec::Mocks.with_temporary_scope do
|
168
|
+
foo = Object.new
|
169
|
+
expect(foo).to receive(:bar)
|
170
|
+
raise "boom"
|
171
|
+
end
|
172
|
+
}.to raise_error("boom") # rather than MockExpectationError
|
173
|
+
end
|
174
|
+
|
175
|
+
def capture_error
|
176
|
+
yield
|
177
|
+
rescue Exception => @error
|
178
|
+
end
|
64
179
|
end
|
65
180
|
|
181
|
+
context "when there is a `let` declaration that overrides an argument matcher" do
|
182
|
+
let(:boolean) { :from_let }
|
183
|
+
|
184
|
+
before do
|
185
|
+
expect(RSpec::Mocks::ArgumentMatchers.method_defined?(:boolean)).to be true
|
186
|
+
end
|
187
|
+
|
188
|
+
it 'allows the `let` definition to win' do
|
189
|
+
expect(boolean).to eq(:from_let)
|
190
|
+
end
|
191
|
+
end
|
66
192
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,18 +1,16 @@
|
|
1
|
+
require 'rspec/support/spec'
|
2
|
+
require 'rspec/mocks/ruby_features'
|
3
|
+
|
4
|
+
RSpec::Support::Spec.setup_simplecov do
|
5
|
+
minimum_coverage 96
|
6
|
+
end
|
7
|
+
|
1
8
|
require 'yaml'
|
2
9
|
begin
|
3
10
|
require 'psych'
|
4
11
|
rescue LoadError
|
5
12
|
end
|
6
13
|
|
7
|
-
begin
|
8
|
-
require 'simplecov'
|
9
|
-
|
10
|
-
SimpleCov.start do
|
11
|
-
add_filter "bundle"
|
12
|
-
end
|
13
|
-
rescue LoadError
|
14
|
-
end unless ENV['NO_COVERAGE'] || RUBY_VERSION < '1.9.3'
|
15
|
-
|
16
14
|
RSpec::Matchers.define :include_method do |expected|
|
17
15
|
match do |actual|
|
18
16
|
actual.map { |m| m.to_s }.include?(expected.to_s)
|
@@ -21,23 +19,24 @@ end
|
|
21
19
|
|
22
20
|
module VerifyAndResetHelpers
|
23
21
|
def verify(object)
|
24
|
-
RSpec::Mocks.proxy_for(object)
|
22
|
+
proxy = RSpec::Mocks.space.proxy_for(object)
|
23
|
+
proxy.verify
|
24
|
+
ensure
|
25
|
+
proxy.reset # so it doesn't fail the verify after the example completes
|
25
26
|
end
|
26
27
|
|
27
28
|
def reset(object)
|
28
|
-
RSpec::Mocks.proxy_for(object).reset
|
29
|
+
RSpec::Mocks.space.proxy_for(object).reset
|
29
30
|
end
|
30
|
-
end
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
32
|
+
def verify_all
|
33
|
+
RSpec::Mocks.space.verify_all
|
34
|
+
ensure
|
35
|
+
reset_all
|
37
36
|
end
|
38
37
|
|
39
|
-
def
|
40
|
-
|
38
|
+
def reset_all
|
39
|
+
RSpec::Mocks.space.reset_all
|
41
40
|
end
|
42
41
|
end
|
43
42
|
|
@@ -48,12 +47,12 @@ module VerificationHelpers
|
|
48
47
|
end
|
49
48
|
end
|
50
49
|
|
50
|
+
require 'rspec/support/spec'
|
51
|
+
|
51
52
|
RSpec.configure do |config|
|
52
53
|
config.mock_with :rspec
|
53
54
|
config.color_enabled = true
|
54
55
|
config.order = :random
|
55
|
-
config.run_all_when_everything_filtered = true
|
56
|
-
config.filter_run_including :focus
|
57
56
|
|
58
57
|
config.expect_with :rspec do |expectations|
|
59
58
|
expectations.syntax = :expect
|
@@ -77,8 +76,9 @@ RSpec.configure do |config|
|
|
77
76
|
end
|
78
77
|
|
79
78
|
config.include VerifyAndResetHelpers
|
80
|
-
config.include DeprecationHelpers
|
81
79
|
config.include VerificationHelpers
|
80
|
+
config.extend RSpec::Mocks::RubyFeatures
|
81
|
+
config.include RSpec::Mocks::RubyFeatures
|
82
82
|
end
|
83
83
|
|
84
84
|
shared_context "with syntax" do |syntax|
|
@@ -107,3 +107,15 @@ shared_context "with isolated configuration" do
|
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
110
|
+
shared_context "with the default mocks syntax" do
|
111
|
+
orig_syntax = nil
|
112
|
+
|
113
|
+
before(:all) do
|
114
|
+
orig_syntax = RSpec::Mocks.configuration.syntax
|
115
|
+
RSpec::Mocks.configuration.reset_syntaxes_to_default
|
116
|
+
end
|
117
|
+
|
118
|
+
after(:all) do
|
119
|
+
RSpec::Mocks.configuration.syntax = orig_syntax
|
120
|
+
end
|
121
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-mocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.beta2
|
5
|
+
prerelease: 6
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Steven Baker
|
@@ -10,55 +11,73 @@ authors:
|
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain:
|
13
|
-
- !
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
14
|
+
- ! '-----BEGIN CERTIFICATE-----
|
15
|
+
|
16
|
+
MIIDjjCCAnagAwIBAgIBATANBgkqhkiG9w0BAQUFADBGMRIwEAYDVQQDDAlyc3Bl
|
17
|
+
|
18
|
+
Yy1kZXYxGzAZBgoJkiaJk/IsZAEZFgtnb29nbGVnb3VwczETMBEGCgmSJomT8ixk
|
19
|
+
|
20
|
+
ARkWA2NvbTAeFw0xMzExMDcxOTQyNTlaFw0xNDExMDcxOTQyNTlaMEYxEjAQBgNV
|
21
|
+
|
22
|
+
BAMMCXJzcGVjLWRldjEbMBkGCgmSJomT8ixkARkWC2dvb2dsZWdvdXBzMRMwEQYK
|
23
|
+
|
24
|
+
CZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
25
|
+
|
26
|
+
nhCeZouDLXWO55no+EdZNCtjXjfJQ1X9TbPcvBDD29OypIUce2h/VdKXB2gI7ZHs
|
27
|
+
|
28
|
+
F5NkPggslTErGFmWAtIiur7u943RVqHOsyoIsy065F9fCtrykkA+22elvTDha4Iz
|
29
|
+
|
30
|
+
RUCvuhQ3klatYk4jF+cGt1jNONNVdLOiy0bMynvcM7hoVQ2AomwGs+cEOWQ/4dkD
|
31
|
+
|
32
|
+
JcNV3qfzF5QBcTD2372XNM53b25nYVQSX2KH5FF7BhlKyov33bOm2gA9M+mWIujW
|
33
|
+
|
34
|
+
qgkyxVlfrlE+ZBgV3wXn1Cojg1LpTq35yOArgwioyrwwlZZJR9joN9s/nDklfr5A
|
35
|
+
|
36
|
+
+dyETjFc6cmEPWZrt2cJBQIDAQABo4GGMIGDMAkGA1UdEwQCMAAwCwYDVR0PBAQD
|
37
|
+
|
38
|
+
AgSwMB0GA1UdDgQWBBSW+WD7hn1swJ1A7i8tbuFeuNCJCjAkBgNVHREEHTAbgRly
|
39
|
+
|
40
|
+
c3BlYy1kZXZAZ29vZ2xlZ291cHMuY29tMCQGA1UdEgQdMBuBGXJzcGVjLWRldkBn
|
41
|
+
|
42
|
+
b29nbGVnb3Vwcy5jb20wDQYJKoZIhvcNAQEFBQADggEBAH27jAZ8sD7vnXupj6Y+
|
43
|
+
|
44
|
+
BaBdfHtCkFaslLJ0aKuMDIVXwYuKfqoW15cZPDLmSIEBuQFM3lw6d/hEEL4Uo2jZ
|
45
|
+
|
46
|
+
FvtmH5OxifPDzFyUtCL4yp6qgNe/Xf6sDsRg6FmKcpgqCwNOmsViaf0LPSUH/GYQ
|
47
|
+
|
48
|
+
3Teoz8QCaDbD7AKsffT7eDrnbHnKweO1XdemRJC98u/yYxnGzMSWKEsn09etBlZ9
|
49
|
+
|
50
|
+
7H67k5Z3uf6cfLZgToWL6zShzZY3Nun5r73YsNf2/QZOe4UZe4vfGvn6baw53ys9
|
51
|
+
|
52
|
+
1yHC1AcSYpvi2dAbOiHT5iQF+krm4wse8KctXgTNnjMsHEoGKulJS2/sZl90jcCz
|
53
|
+
|
54
|
+
muA=
|
55
|
+
|
56
|
+
-----END CERTIFICATE-----
|
57
|
+
|
58
|
+
'
|
59
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
44
60
|
dependencies:
|
45
61
|
- !ruby/object:Gem::Dependency
|
46
62
|
name: rspec-support
|
47
63
|
requirement: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
48
65
|
requirements:
|
49
66
|
- - '='
|
50
67
|
- !ruby/object:Gem::Version
|
51
|
-
version: 3.0.0.
|
68
|
+
version: 3.0.0.beta2
|
52
69
|
type: :runtime
|
53
70
|
prerelease: false
|
54
71
|
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
55
73
|
requirements:
|
56
74
|
- - '='
|
57
75
|
- !ruby/object:Gem::Version
|
58
|
-
version: 3.0.0.
|
76
|
+
version: 3.0.0.beta2
|
59
77
|
- !ruby/object:Gem::Dependency
|
60
78
|
name: rake
|
61
79
|
requirement: !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
62
81
|
requirements:
|
63
82
|
- - ~>
|
64
83
|
- !ruby/object:Gem::Version
|
@@ -66,6 +85,7 @@ dependencies:
|
|
66
85
|
type: :development
|
67
86
|
prerelease: false
|
68
87
|
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
69
89
|
requirements:
|
70
90
|
- - ~>
|
71
91
|
- !ruby/object:Gem::Version
|
@@ -73,6 +93,7 @@ dependencies:
|
|
73
93
|
- !ruby/object:Gem::Dependency
|
74
94
|
name: cucumber
|
75
95
|
requirement: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
76
97
|
requirements:
|
77
98
|
- - ~>
|
78
99
|
- !ruby/object:Gem::Version
|
@@ -80,6 +101,7 @@ dependencies:
|
|
80
101
|
type: :development
|
81
102
|
prerelease: false
|
82
103
|
version_requirements: !ruby/object:Gem::Requirement
|
104
|
+
none: false
|
83
105
|
requirements:
|
84
106
|
- - ~>
|
85
107
|
- !ruby/object:Gem::Version
|
@@ -87,6 +109,7 @@ dependencies:
|
|
87
109
|
- !ruby/object:Gem::Dependency
|
88
110
|
name: aruba
|
89
111
|
requirement: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
90
113
|
requirements:
|
91
114
|
- - ~>
|
92
115
|
- !ruby/object:Gem::Version
|
@@ -94,6 +117,7 @@ dependencies:
|
|
94
117
|
type: :development
|
95
118
|
prerelease: false
|
96
119
|
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
97
121
|
requirements:
|
98
122
|
- - ~>
|
99
123
|
- !ruby/object:Gem::Version
|
@@ -106,6 +130,7 @@ extra_rdoc_files: []
|
|
106
130
|
files:
|
107
131
|
- lib/rspec/mocks.rb
|
108
132
|
- lib/rspec/mocks/any_instance/chain.rb
|
133
|
+
- lib/rspec/mocks/any_instance/expect_chain_chain.rb
|
109
134
|
- lib/rspec/mocks/any_instance/expectation_chain.rb
|
110
135
|
- lib/rspec/mocks/any_instance/message_chains.rb
|
111
136
|
- lib/rspec/mocks/any_instance/recorder.rb
|
@@ -113,29 +138,28 @@ files:
|
|
113
138
|
- lib/rspec/mocks/any_instance/stub_chain_chain.rb
|
114
139
|
- lib/rspec/mocks/argument_list_matcher.rb
|
115
140
|
- lib/rspec/mocks/argument_matchers.rb
|
116
|
-
- lib/rspec/mocks/arity_calculator.rb
|
117
141
|
- lib/rspec/mocks/configuration.rb
|
118
142
|
- lib/rspec/mocks/error_generator.rb
|
119
|
-
- lib/rspec/mocks/errors.rb
|
120
143
|
- lib/rspec/mocks/example_methods.rb
|
121
144
|
- lib/rspec/mocks/extensions/marshal.rb
|
122
145
|
- lib/rspec/mocks/framework.rb
|
123
146
|
- lib/rspec/mocks/instance_method_stasher.rb
|
124
147
|
- lib/rspec/mocks/matchers/have_received.rb
|
125
148
|
- lib/rspec/mocks/matchers/receive.rb
|
149
|
+
- lib/rspec/mocks/matchers/receive_message_chain.rb
|
126
150
|
- lib/rspec/mocks/matchers/receive_messages.rb
|
151
|
+
- lib/rspec/mocks/message_chain.rb
|
127
152
|
- lib/rspec/mocks/message_expectation.rb
|
128
153
|
- lib/rspec/mocks/method_double.rb
|
129
154
|
- lib/rspec/mocks/method_reference.rb
|
130
|
-
- lib/rspec/mocks/
|
155
|
+
- lib/rspec/mocks/method_signature_verifier.rb
|
131
156
|
- lib/rspec/mocks/mutate_const.rb
|
132
157
|
- lib/rspec/mocks/object_reference.rb
|
133
158
|
- lib/rspec/mocks/order_group.rb
|
134
159
|
- lib/rspec/mocks/proxy.rb
|
135
|
-
- lib/rspec/mocks/
|
160
|
+
- lib/rspec/mocks/ruby_features.rb
|
136
161
|
- lib/rspec/mocks/space.rb
|
137
162
|
- lib/rspec/mocks/standalone.rb
|
138
|
-
- lib/rspec/mocks/stub_chain.rb
|
139
163
|
- lib/rspec/mocks/syntax.rb
|
140
164
|
- lib/rspec/mocks/targets.rb
|
141
165
|
- lib/rspec/mocks/test_double.rb
|
@@ -162,21 +186,21 @@ files:
|
|
162
186
|
- features/message_expectations/call_original.feature
|
163
187
|
- features/message_expectations/expect_message_using_expect.feature
|
164
188
|
- features/message_expectations/expect_message_using_should_receive.feature
|
189
|
+
- features/message_expectations/message_chains_using_expect.feature
|
165
190
|
- features/message_expectations/receive_counts.feature
|
166
191
|
- features/message_expectations/warn_when_expectation_is_set_on_nil.feature
|
167
192
|
- features/method_stubs/README.md
|
168
|
-
- features/method_stubs/
|
193
|
+
- features/method_stubs/allow_any_instance_of.feature
|
169
194
|
- features/method_stubs/as_null_object.feature
|
195
|
+
- features/method_stubs/receive_message_chain.feature
|
170
196
|
- features/method_stubs/simple_return_value_with_allow.feature
|
171
197
|
- features/method_stubs/simple_return_value_with_stub.feature
|
172
|
-
- features/method_stubs/stub_chain.feature
|
173
198
|
- features/method_stubs/stub_implementation.feature
|
174
199
|
- features/method_stubs/to_ary.feature
|
175
200
|
- features/mutating_constants/README.md
|
176
201
|
- features/mutating_constants/hiding_defined_constant.feature
|
177
202
|
- features/mutating_constants/stub_defined_constant.feature
|
178
203
|
- features/mutating_constants/stub_undefined_constant.feature
|
179
|
-
- features/outside_rspec/configuration.feature
|
180
204
|
- features/outside_rspec/standalone.feature
|
181
205
|
- features/spies/spy_partial_mock_method.feature
|
182
206
|
- features/spies/spy_pure_mock_method.feature
|
@@ -185,37 +209,39 @@ files:
|
|
185
209
|
- features/support/env.rb
|
186
210
|
- features/support/rubinius.rb
|
187
211
|
- features/test_frameworks/test_unit.feature
|
212
|
+
- features/verifying_doubles/README.md
|
188
213
|
- features/verifying_doubles/class_doubles.feature
|
189
214
|
- features/verifying_doubles/dynamic_classes.feature
|
190
|
-
- features/verifying_doubles/
|
215
|
+
- features/verifying_doubles/instance_doubles.feature
|
191
216
|
- features/verifying_doubles/object_doubles.feature
|
192
217
|
- features/verifying_doubles/partial_doubles.feature
|
193
218
|
- spec/rspec/mocks/and_call_original_spec.rb
|
219
|
+
- spec/rspec/mocks/and_return_spec.rb
|
194
220
|
- spec/rspec/mocks/and_yield_spec.rb
|
195
221
|
- spec/rspec/mocks/any_instance/message_chains_spec.rb
|
196
222
|
- spec/rspec/mocks/any_instance_spec.rb
|
197
|
-
- spec/rspec/mocks/argument_expectation_spec.rb
|
198
|
-
- spec/rspec/mocks/arity_calculator_spec.rb
|
199
223
|
- spec/rspec/mocks/array_including_matcher_spec.rb
|
200
224
|
- spec/rspec/mocks/at_least_spec.rb
|
201
225
|
- spec/rspec/mocks/at_most_spec.rb
|
226
|
+
- spec/rspec/mocks/before_all_spec.rb
|
202
227
|
- spec/rspec/mocks/block_return_value_spec.rb
|
203
228
|
- spec/rspec/mocks/combining_implementation_instructions_spec.rb
|
204
229
|
- spec/rspec/mocks/configuration_spec.rb
|
205
230
|
- spec/rspec/mocks/double_spec.rb
|
231
|
+
- spec/rspec/mocks/example_methods_spec.rb
|
206
232
|
- spec/rspec/mocks/extensions/marshal_spec.rb
|
207
233
|
- spec/rspec/mocks/failing_argument_matchers_spec.rb
|
208
234
|
- spec/rspec/mocks/hash_excluding_matcher_spec.rb
|
209
235
|
- spec/rspec/mocks/hash_including_matcher_spec.rb
|
210
236
|
- spec/rspec/mocks/instance_method_stasher_spec.rb
|
211
237
|
- spec/rspec/mocks/matchers/have_received_spec.rb
|
238
|
+
- spec/rspec/mocks/matchers/receive_message_chain_spec.rb
|
212
239
|
- spec/rspec/mocks/matchers/receive_messages_spec.rb
|
213
240
|
- spec/rspec/mocks/matchers/receive_spec.rb
|
241
|
+
- spec/rspec/mocks/method_signature_verifier_spec.rb
|
214
242
|
- spec/rspec/mocks/methods_spec.rb
|
215
243
|
- spec/rspec/mocks/mock_expectation_error_spec.rb
|
216
244
|
- spec/rspec/mocks/mock_ordering_spec.rb
|
217
|
-
- spec/rspec/mocks/mock_space_spec.rb
|
218
|
-
- spec/rspec/mocks/mock_spec.rb
|
219
245
|
- spec/rspec/mocks/multiple_return_value_spec.rb
|
220
246
|
- spec/rspec/mocks/mutate_const_spec.rb
|
221
247
|
- spec/rspec/mocks/nil_expectation_warning_spec.rb
|
@@ -223,8 +249,8 @@ files:
|
|
223
249
|
- spec/rspec/mocks/once_counts_spec.rb
|
224
250
|
- spec/rspec/mocks/options_hash_spec.rb
|
225
251
|
- spec/rspec/mocks/order_group_spec.rb
|
226
|
-
- spec/rspec/mocks/
|
227
|
-
- spec/rspec/mocks/
|
252
|
+
- spec/rspec/mocks/partial_double_spec.rb
|
253
|
+
- spec/rspec/mocks/partial_double_using_mocks_directly_spec.rb
|
228
254
|
- spec/rspec/mocks/passing_argument_matchers_spec.rb
|
229
255
|
- spec/rspec/mocks/precise_counts_spec.rb
|
230
256
|
- spec/rspec/mocks/record_messages_spec.rb
|
@@ -236,6 +262,7 @@ files:
|
|
236
262
|
- spec/rspec/mocks/stub_spec.rb
|
237
263
|
- spec/rspec/mocks/stubbed_message_expectations_spec.rb
|
238
264
|
- spec/rspec/mocks/syntax_agnostic_message_matchers_spec.rb
|
265
|
+
- spec/rspec/mocks/syntax_spec.rb
|
239
266
|
- spec/rspec/mocks/test_double_spec.rb
|
240
267
|
- spec/rspec/mocks/to_ary_spec.rb
|
241
268
|
- spec/rspec/mocks/twice_counts_spec.rb
|
@@ -246,28 +273,29 @@ files:
|
|
246
273
|
homepage: http://github.com/rspec/rspec-mocks
|
247
274
|
licenses:
|
248
275
|
- MIT
|
249
|
-
metadata: {}
|
250
276
|
post_install_message:
|
251
277
|
rdoc_options:
|
252
278
|
- --charset=UTF-8
|
253
279
|
require_paths:
|
254
280
|
- lib
|
255
281
|
required_ruby_version: !ruby/object:Gem::Requirement
|
282
|
+
none: false
|
256
283
|
requirements:
|
257
284
|
- - ! '>='
|
258
285
|
- !ruby/object:Gem::Version
|
259
286
|
version: 1.8.7
|
260
287
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
288
|
+
none: false
|
261
289
|
requirements:
|
262
290
|
- - ! '>'
|
263
291
|
- !ruby/object:Gem::Version
|
264
292
|
version: 1.3.1
|
265
293
|
requirements: []
|
266
294
|
rubyforge_project: rspec
|
267
|
-
rubygems_version:
|
295
|
+
rubygems_version: 1.8.23
|
268
296
|
signing_key:
|
269
|
-
specification_version:
|
270
|
-
summary: rspec-mocks-3.0.0.
|
297
|
+
specification_version: 3
|
298
|
+
summary: rspec-mocks-3.0.0.beta2
|
271
299
|
test_files:
|
272
300
|
- features/README.md
|
273
301
|
- features/Scope.md
|
@@ -283,21 +311,21 @@ test_files:
|
|
283
311
|
- features/message_expectations/call_original.feature
|
284
312
|
- features/message_expectations/expect_message_using_expect.feature
|
285
313
|
- features/message_expectations/expect_message_using_should_receive.feature
|
314
|
+
- features/message_expectations/message_chains_using_expect.feature
|
286
315
|
- features/message_expectations/receive_counts.feature
|
287
316
|
- features/message_expectations/warn_when_expectation_is_set_on_nil.feature
|
288
317
|
- features/method_stubs/README.md
|
289
|
-
- features/method_stubs/
|
318
|
+
- features/method_stubs/allow_any_instance_of.feature
|
290
319
|
- features/method_stubs/as_null_object.feature
|
320
|
+
- features/method_stubs/receive_message_chain.feature
|
291
321
|
- features/method_stubs/simple_return_value_with_allow.feature
|
292
322
|
- features/method_stubs/simple_return_value_with_stub.feature
|
293
|
-
- features/method_stubs/stub_chain.feature
|
294
323
|
- features/method_stubs/stub_implementation.feature
|
295
324
|
- features/method_stubs/to_ary.feature
|
296
325
|
- features/mutating_constants/README.md
|
297
326
|
- features/mutating_constants/hiding_defined_constant.feature
|
298
327
|
- features/mutating_constants/stub_defined_constant.feature
|
299
328
|
- features/mutating_constants/stub_undefined_constant.feature
|
300
|
-
- features/outside_rspec/configuration.feature
|
301
329
|
- features/outside_rspec/standalone.feature
|
302
330
|
- features/spies/spy_partial_mock_method.feature
|
303
331
|
- features/spies/spy_pure_mock_method.feature
|
@@ -306,37 +334,39 @@ test_files:
|
|
306
334
|
- features/support/env.rb
|
307
335
|
- features/support/rubinius.rb
|
308
336
|
- features/test_frameworks/test_unit.feature
|
337
|
+
- features/verifying_doubles/README.md
|
309
338
|
- features/verifying_doubles/class_doubles.feature
|
310
339
|
- features/verifying_doubles/dynamic_classes.feature
|
311
|
-
- features/verifying_doubles/
|
340
|
+
- features/verifying_doubles/instance_doubles.feature
|
312
341
|
- features/verifying_doubles/object_doubles.feature
|
313
342
|
- features/verifying_doubles/partial_doubles.feature
|
314
343
|
- spec/rspec/mocks/and_call_original_spec.rb
|
344
|
+
- spec/rspec/mocks/and_return_spec.rb
|
315
345
|
- spec/rspec/mocks/and_yield_spec.rb
|
316
346
|
- spec/rspec/mocks/any_instance/message_chains_spec.rb
|
317
347
|
- spec/rspec/mocks/any_instance_spec.rb
|
318
|
-
- spec/rspec/mocks/argument_expectation_spec.rb
|
319
|
-
- spec/rspec/mocks/arity_calculator_spec.rb
|
320
348
|
- spec/rspec/mocks/array_including_matcher_spec.rb
|
321
349
|
- spec/rspec/mocks/at_least_spec.rb
|
322
350
|
- spec/rspec/mocks/at_most_spec.rb
|
351
|
+
- spec/rspec/mocks/before_all_spec.rb
|
323
352
|
- spec/rspec/mocks/block_return_value_spec.rb
|
324
353
|
- spec/rspec/mocks/combining_implementation_instructions_spec.rb
|
325
354
|
- spec/rspec/mocks/configuration_spec.rb
|
326
355
|
- spec/rspec/mocks/double_spec.rb
|
356
|
+
- spec/rspec/mocks/example_methods_spec.rb
|
327
357
|
- spec/rspec/mocks/extensions/marshal_spec.rb
|
328
358
|
- spec/rspec/mocks/failing_argument_matchers_spec.rb
|
329
359
|
- spec/rspec/mocks/hash_excluding_matcher_spec.rb
|
330
360
|
- spec/rspec/mocks/hash_including_matcher_spec.rb
|
331
361
|
- spec/rspec/mocks/instance_method_stasher_spec.rb
|
332
362
|
- spec/rspec/mocks/matchers/have_received_spec.rb
|
363
|
+
- spec/rspec/mocks/matchers/receive_message_chain_spec.rb
|
333
364
|
- spec/rspec/mocks/matchers/receive_messages_spec.rb
|
334
365
|
- spec/rspec/mocks/matchers/receive_spec.rb
|
366
|
+
- spec/rspec/mocks/method_signature_verifier_spec.rb
|
335
367
|
- spec/rspec/mocks/methods_spec.rb
|
336
368
|
- spec/rspec/mocks/mock_expectation_error_spec.rb
|
337
369
|
- spec/rspec/mocks/mock_ordering_spec.rb
|
338
|
-
- spec/rspec/mocks/mock_space_spec.rb
|
339
|
-
- spec/rspec/mocks/mock_spec.rb
|
340
370
|
- spec/rspec/mocks/multiple_return_value_spec.rb
|
341
371
|
- spec/rspec/mocks/mutate_const_spec.rb
|
342
372
|
- spec/rspec/mocks/nil_expectation_warning_spec.rb
|
@@ -344,8 +374,8 @@ test_files:
|
|
344
374
|
- spec/rspec/mocks/once_counts_spec.rb
|
345
375
|
- spec/rspec/mocks/options_hash_spec.rb
|
346
376
|
- spec/rspec/mocks/order_group_spec.rb
|
347
|
-
- spec/rspec/mocks/
|
348
|
-
- spec/rspec/mocks/
|
377
|
+
- spec/rspec/mocks/partial_double_spec.rb
|
378
|
+
- spec/rspec/mocks/partial_double_using_mocks_directly_spec.rb
|
349
379
|
- spec/rspec/mocks/passing_argument_matchers_spec.rb
|
350
380
|
- spec/rspec/mocks/precise_counts_spec.rb
|
351
381
|
- spec/rspec/mocks/record_messages_spec.rb
|
@@ -357,6 +387,7 @@ test_files:
|
|
357
387
|
- spec/rspec/mocks/stub_spec.rb
|
358
388
|
- spec/rspec/mocks/stubbed_message_expectations_spec.rb
|
359
389
|
- spec/rspec/mocks/syntax_agnostic_message_matchers_spec.rb
|
390
|
+
- spec/rspec/mocks/syntax_spec.rb
|
360
391
|
- spec/rspec/mocks/test_double_spec.rb
|
361
392
|
- spec/rspec/mocks/to_ary_spec.rb
|
362
393
|
- spec/rspec/mocks/twice_counts_spec.rb
|