rspec-mocks 2.5.0 → 2.6.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +7 -0
- data/Gemfile +13 -12
- data/Guardfile +3 -3
- data/README.md +2 -0
- data/features/.nav +4 -0
- data/features/Changelog.md +12 -0
- data/features/README.markdown +44 -4
- data/features/message_expectations/any_instance.feature +19 -0
- data/features/message_expectations/block_local_expectations.feature.pending +2 -2
- data/features/message_expectations/expect_message.feature +3 -3
- data/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +3 -3
- data/features/method_stubs/README.md +32 -24
- data/features/method_stubs/any_instance.feature +23 -0
- data/features/method_stubs/as_null_object.feature +36 -0
- data/features/method_stubs/simple_return_value.feature +2 -2
- data/features/method_stubs/stub_chain.feature +13 -6
- data/features/method_stubs/stub_implementation.feature +1 -1
- data/features/method_stubs/to_ary.feature +45 -0
- data/features/outside_rspec/configuration.feature +3 -3
- data/features/outside_rspec/standalone.feature +2 -2
- data/features/step_definitions/additional_cli_steps.rb +4 -0
- data/features/support/env.rb +5 -1
- data/lib/rspec/mocks.rb +2 -1
- data/lib/rspec/mocks/any_instance.rb +246 -0
- data/lib/rspec/mocks/extensions/psych.rb +23 -0
- data/lib/rspec/mocks/framework.rb +1 -0
- data/lib/rspec/mocks/message_expectation.rb +7 -4
- data/lib/rspec/mocks/methods.rb +1 -1
- data/lib/rspec/mocks/mock.rb +2 -2
- data/lib/rspec/mocks/serialization.rb +5 -3
- data/lib/rspec/mocks/space.rb +1 -1
- data/lib/rspec/mocks/version.rb +1 -1
- data/spec/rspec/mocks/and_yield_spec.rb +3 -3
- data/spec/rspec/mocks/any_instance_spec.rb +578 -0
- data/spec/rspec/mocks/any_number_of_times_spec.rb +22 -28
- data/spec/rspec/mocks/at_least_spec.rb +6 -0
- data/spec/rspec/mocks/at_most_spec.rb +6 -0
- data/spec/rspec/mocks/bug_report_10263_spec.rb +12 -14
- data/spec/rspec/mocks/bug_report_7611_spec.rb +2 -4
- data/spec/rspec/mocks/failing_argument_matchers_spec.rb +45 -46
- data/spec/rspec/mocks/nil_expectation_warning_spec.rb +1 -2
- data/spec/rspec/mocks/passing_argument_matchers_spec.rb +119 -122
- data/spec/rspec/mocks/precise_counts_spec.rb +6 -0
- data/spec/rspec/mocks/serialization_spec.rb +21 -3
- data/spec/rspec/mocks/stub_chain_spec.rb +72 -37
- data/spec/rspec/mocks/stub_spec.rb +64 -61
- data/spec/rspec/mocks/to_ary_spec.rb +31 -0
- metadata +32 -15
- data/spec/rspec/mocks/bug_report_7805_spec.rb +0 -22
- data/spec/rspec/mocks/bug_report_8302_spec.rb +0 -26
@@ -31,6 +31,12 @@ module RSpec
|
|
31
31
|
@mock.rspec_verify
|
32
32
|
end
|
33
33
|
|
34
|
+
it "returns the value given by a block when the exactly once method is called" do
|
35
|
+
@mock.should_receive(:to_s).exactly(:once) { "testing" }
|
36
|
+
@mock.to_s.should == "testing"
|
37
|
+
@mock.rspec_verify
|
38
|
+
end
|
39
|
+
|
34
40
|
it "passes multiple calls with different args and counts" do
|
35
41
|
@mock.should_receive(:random_call).twice.with(1)
|
36
42
|
@mock.should_receive(:random_call).once.with(2)
|
@@ -47,13 +47,13 @@ module RSpec
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
subject { SerializableStruct.new(7, "something") }
|
50
|
+
subject { RSpec::Mocks::SerializableStruct.new(7, "something") }
|
51
51
|
|
52
52
|
def set_stub
|
53
53
|
subject.stub(:bazz => 5)
|
54
54
|
end
|
55
55
|
|
56
|
-
|
56
|
+
shared_examples_for 'normal YAML serialization' do
|
57
57
|
it 'serializes to yaml the same with and without stubbing, using #to_yaml' do
|
58
58
|
expect { set_stub }.to_not change { subject.to_yaml }
|
59
59
|
end
|
@@ -63,6 +63,24 @@ module RSpec
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
+
with_yaml_loaded do
|
67
|
+
compiled_with_psych = RbConfig::CONFIG['configure_args'] =~ /with-libyaml/
|
68
|
+
|
69
|
+
if compiled_with_psych
|
70
|
+
context 'using Syck as the YAML engine' do
|
71
|
+
before(:each) { YAML::ENGINE.yamler = 'syck' }
|
72
|
+
it_behaves_like 'normal YAML serialization'
|
73
|
+
end
|
74
|
+
|
75
|
+
context 'using Psych as the YAML engine' do
|
76
|
+
before(:each) { YAML::ENGINE.yamler = 'psych' }
|
77
|
+
it_behaves_like 'normal YAML serialization'
|
78
|
+
end
|
79
|
+
else
|
80
|
+
it_behaves_like 'normal YAML serialization'
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
66
84
|
without_yaml_loaded do
|
67
85
|
it 'does not add #to_yaml to the stubbed object' do
|
68
86
|
subject.should_not respond_to(:to_yaml)
|
@@ -76,7 +94,7 @@ module RSpec
|
|
76
94
|
end
|
77
95
|
|
78
96
|
describe "an object that has its own mock_proxy instance variable" do
|
79
|
-
subject { SerializableMockProxy.new(:my_mock_proxy) }
|
97
|
+
subject { RSpec::Mocks::SerializableMockProxy.new(:my_mock_proxy) }
|
80
98
|
|
81
99
|
it 'does not interfere with its marshalling' do
|
82
100
|
marshalled_copy = Marshal.load(Marshal.dump(subject))
|
@@ -3,30 +3,27 @@ require 'spec_helper'
|
|
3
3
|
module RSpec
|
4
4
|
module Mocks
|
5
5
|
describe "A chained method stub" do
|
6
|
-
|
7
|
-
@subject = Object.new
|
8
|
-
end
|
9
|
-
|
6
|
+
subject { Object.new }
|
10
7
|
|
11
8
|
context "with one method in chain" do
|
12
9
|
context "using and_return" do
|
13
10
|
it "returns expected value from chaining only one method call" do
|
14
|
-
|
15
|
-
|
11
|
+
subject.stub_chain(:msg1).and_return(:return_value)
|
12
|
+
subject.msg1.should equal(:return_value)
|
16
13
|
end
|
17
14
|
end
|
18
15
|
|
19
16
|
context "using a block" do
|
20
17
|
it "returns the correct value" do
|
21
|
-
|
22
|
-
|
18
|
+
subject.stub_chain(:msg1) { :return_value }
|
19
|
+
subject.msg1.should equal(:return_value)
|
23
20
|
end
|
24
21
|
end
|
25
22
|
|
26
23
|
context "using a hash" do
|
27
24
|
it "returns the value of the key/value pair" do
|
28
|
-
|
29
|
-
|
25
|
+
subject.stub_chain(:msg1 => :return_value)
|
26
|
+
subject.msg1.should equal(:return_value)
|
30
27
|
end
|
31
28
|
end
|
32
29
|
end
|
@@ -34,22 +31,22 @@ module RSpec
|
|
34
31
|
context "with two methods in chain" do
|
35
32
|
context "using and_return" do
|
36
33
|
it "returns expected value from chaining two method calls" do
|
37
|
-
|
38
|
-
|
34
|
+
subject.stub_chain(:msg1, :msg2).and_return(:return_value)
|
35
|
+
subject.msg1.msg2.should equal(:return_value)
|
39
36
|
end
|
40
37
|
end
|
41
38
|
|
42
39
|
context "using a block" do
|
43
40
|
it "returns the correct value" do
|
44
|
-
|
45
|
-
|
41
|
+
subject.stub_chain(:msg1, :msg2) { :return_value }
|
42
|
+
subject.msg1.msg2.should equal(:return_value)
|
46
43
|
end
|
47
44
|
end
|
48
45
|
|
49
46
|
context "using a hash" do
|
50
47
|
it "returns the value of the key/value pair" do
|
51
|
-
|
52
|
-
|
48
|
+
subject.stub_chain(:msg1, :msg2 => :return_value)
|
49
|
+
subject.msg1.msg2.should equal(:return_value)
|
53
50
|
end
|
54
51
|
end
|
55
52
|
end
|
@@ -57,57 +54,95 @@ module RSpec
|
|
57
54
|
context "with four methods in chain" do
|
58
55
|
context "using and_return" do
|
59
56
|
it "returns expected value from chaining two method calls" do
|
60
|
-
|
61
|
-
|
57
|
+
subject.stub_chain(:msg1, :msg2, :msg3, :msg4).and_return(:return_value)
|
58
|
+
subject.msg1.msg2.msg3.msg4.should equal(:return_value)
|
62
59
|
end
|
63
60
|
end
|
64
61
|
|
65
62
|
context "using a block" do
|
66
63
|
it "returns the correct value" do
|
67
|
-
|
68
|
-
|
64
|
+
subject.stub_chain(:msg1, :msg2, :msg3, :msg4) { :return_value }
|
65
|
+
subject.msg1.msg2.msg3.msg4.should equal(:return_value)
|
69
66
|
end
|
70
67
|
end
|
71
68
|
|
72
69
|
context "using a hash" do
|
73
70
|
it "returns the value of the key/value pair" do
|
74
|
-
|
75
|
-
|
71
|
+
subject.stub_chain(:msg1, :msg2, :msg3, :msg4 => :return_value)
|
72
|
+
subject.msg1.msg2.msg3.msg4.should equal(:return_value)
|
76
73
|
end
|
77
74
|
end
|
78
75
|
|
79
76
|
context "using a hash with a string key" do
|
80
77
|
it "returns the value of the key/value pair" do
|
81
|
-
|
82
|
-
|
78
|
+
subject.stub_chain("msg1.msg2.msg3.msg4" => :return_value)
|
79
|
+
subject.msg1.msg2.msg3.msg4.should equal(:return_value)
|
83
80
|
end
|
84
81
|
end
|
85
82
|
end
|
86
83
|
|
87
84
|
it "returns expected value from chaining four method calls" do
|
88
|
-
|
89
|
-
|
85
|
+
subject.stub_chain(:msg1, :msg2, :msg3, :msg4).and_return(:return_value)
|
86
|
+
subject.msg1.msg2.msg3.msg4.should equal(:return_value)
|
90
87
|
end
|
91
88
|
|
92
|
-
|
93
|
-
|
94
|
-
|
89
|
+
context "with messages shared across multiple chains" do
|
90
|
+
context "using and_return" do
|
91
|
+
context "starting with the same message" do
|
92
|
+
it "returns expected value" do
|
93
|
+
subject.stub_chain(:msg1, :msg2, :msg3).and_return(:first)
|
94
|
+
subject.stub_chain(:msg1, :msg2, :msg4).and_return(:second)
|
95
|
+
|
96
|
+
subject.msg1.msg2.msg3.should equal(:first)
|
97
|
+
subject.msg1.msg2.msg4.should equal(:second)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
context "starting with the different messages" do
|
102
|
+
it "returns expected value" do
|
103
|
+
subject.stub_chain(:msg1, :msg2, :msg3).and_return(:first)
|
104
|
+
subject.stub_chain(:msg4, :msg2, :msg3).and_return(:second)
|
105
|
+
|
106
|
+
subject.msg1.msg2.msg3.should equal(:first)
|
107
|
+
subject.msg4.msg2.msg3.should equal(:second)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
context "using => value" do
|
113
|
+
context "starting with the same message" do
|
114
|
+
it "returns expected value", :focus => true do
|
115
|
+
subject.stub_chain(:msg1, :msg2, :msg3 => :first)
|
116
|
+
subject.stub_chain(:msg1, :msg2, :msg4 => :second)
|
117
|
+
|
118
|
+
subject.msg1.msg2.msg3.should equal(:first)
|
119
|
+
subject.msg1.msg2.msg4.should equal(:second)
|
120
|
+
end
|
121
|
+
end
|
95
122
|
|
96
|
-
|
97
|
-
|
123
|
+
context "starting with different messages" do
|
124
|
+
it "returns expected value", :focus => true do
|
125
|
+
subject.stub_chain(:msg1, :msg2, :msg3 => :first)
|
126
|
+
subject.stub_chain(:msg4, :msg2, :msg3 => :second)
|
127
|
+
|
128
|
+
subject.msg1.msg2.msg3.should equal(:first)
|
129
|
+
subject.msg4.msg2.msg3.should equal(:second)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
98
133
|
end
|
99
134
|
|
100
135
|
it "returns expected value when chain is a dot separated string, like stub_chain('msg1.msg2.msg3')" do
|
101
|
-
|
102
|
-
|
136
|
+
subject.stub_chain("msg1.msg2.msg3").and_return(:return_value)
|
137
|
+
subject.msg1.msg2.msg3.should equal(:return_value)
|
103
138
|
end
|
104
139
|
|
105
140
|
it "returns expected value from two chains with shared messages at the beginning" do
|
106
|
-
|
107
|
-
|
141
|
+
subject.stub_chain(:msg1, :msg2, :msg3, :msg4).and_return(:first)
|
142
|
+
subject.stub_chain(:msg1, :msg2, :msg3, :msg5).and_return(:second)
|
108
143
|
|
109
|
-
|
110
|
-
|
144
|
+
subject.msg1.msg2.msg3.msg4.should equal(:first)
|
145
|
+
subject.msg1.msg2.msg3.msg5.should equal(:second)
|
111
146
|
end
|
112
147
|
end
|
113
148
|
end
|
@@ -31,7 +31,7 @@ module RSpec
|
|
31
31
|
|
32
32
|
[:stub!, :stub].each do |method|
|
33
33
|
describe "using #{method}" do
|
34
|
-
it "returns
|
34
|
+
it "returns declared value when message is received" do
|
35
35
|
@instance.send(method, :msg).and_return(:return_value)
|
36
36
|
@instance.msg.should equal(:return_value)
|
37
37
|
@instance.rspec_verify
|
@@ -39,92 +39,95 @@ module RSpec
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
it "
|
42
|
+
it "instructs an instance to respond_to the message" do
|
43
|
+
@instance.stub(:msg)
|
44
|
+
@instance.should respond_to(:msg)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "instructs a class object to respond_to the message" do
|
48
|
+
@class.stub(:msg)
|
49
|
+
@class.should respond_to(:msg)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "ignores when expected message is received with no args" do
|
43
53
|
@instance.stub(:msg)
|
44
54
|
@instance.msg
|
45
|
-
|
55
|
+
expect do
|
46
56
|
@instance.rspec_verify
|
47
|
-
end.
|
57
|
+
end.not_to raise_error
|
48
58
|
end
|
49
59
|
|
50
60
|
it "ignores when message is received with args" do
|
51
61
|
@instance.stub(:msg)
|
52
62
|
@instance.msg(:an_arg)
|
53
|
-
|
63
|
+
expect do
|
54
64
|
@instance.rspec_verify
|
55
|
-
end.
|
65
|
+
end.not_to raise_error
|
56
66
|
end
|
57
67
|
|
58
68
|
it "ignores when expected message is not received" do
|
59
69
|
@instance.stub(:msg)
|
60
|
-
|
70
|
+
expect do
|
61
71
|
@instance.rspec_verify
|
62
|
-
end.
|
72
|
+
end.not_to raise_error
|
63
73
|
end
|
64
74
|
|
65
75
|
it "handles multiple stubbed methods" do
|
66
76
|
@instance.stub(:msg1 => 1, :msg2 => 2)
|
67
|
-
@instance.msg1.should
|
68
|
-
@instance.msg2.should
|
69
|
-
end
|
70
|
-
|
71
|
-
it "clears itself when verified" do
|
72
|
-
@instance.stub(:this_should_go).and_return(:blah)
|
73
|
-
@instance.this_should_go.should == :blah
|
74
|
-
@instance.rspec_verify
|
75
|
-
lambda do
|
76
|
-
@instance.this_should_go
|
77
|
-
end.should raise_error(NameError)
|
77
|
+
@instance.msg1.should eq(1)
|
78
|
+
@instance.msg2.should eq(2)
|
78
79
|
end
|
79
80
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
end
|
81
|
+
describe "#rspec_reset" do
|
82
|
+
it "removes stubbed methods that didn't exist" do
|
83
|
+
@instance.stub(:non_existent_method)
|
84
|
+
@instance.rspec_reset
|
85
|
+
@instance.should_not respond_to(:non_existent_method)
|
86
|
+
end
|
87
87
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
@instance.msg.should == return_values[2]
|
95
|
-
@instance.msg.should == return_values[2]
|
96
|
-
end
|
97
|
-
|
98
|
-
it "reverts to original instance method if there is one" do
|
99
|
-
@instance.existing_instance_method.should equal(:original_value)
|
100
|
-
@instance.stub(:existing_instance_method).and_return(:mock_value)
|
101
|
-
@instance.existing_instance_method.should equal(:mock_value)
|
102
|
-
@instance.rspec_verify
|
103
|
-
@instance.existing_instance_method.should equal(:original_value)
|
104
|
-
end
|
88
|
+
it "restores existing instance methods" do
|
89
|
+
# See bug reports 8302 adn 7805
|
90
|
+
@instance.stub(:existing_instance_method) { :stub_value }
|
91
|
+
@instance.rspec_reset
|
92
|
+
@instance.existing_instance_method.should eq(:original_value)
|
93
|
+
end
|
105
94
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
95
|
+
it "restores existing private instance methods" do
|
96
|
+
# See bug reports 8302 adn 7805
|
97
|
+
@instance.stub(:existing_private_instance_method) { :stub_value }
|
98
|
+
@instance.rspec_reset
|
99
|
+
@instance.send(:existing_private_instance_method).should eq(:original_value)
|
100
|
+
end
|
101
|
+
|
102
|
+
it "restores existing class methods" do
|
103
|
+
# See bug reports 8302 adn 7805
|
104
|
+
@class.stub(:existing_class_method) { :stub_value }
|
105
|
+
@class.rspec_reset
|
106
|
+
@class.existing_class_method.should eq(:original_value)
|
107
|
+
end
|
108
|
+
|
109
|
+
it "restores existing private class methods" do
|
110
|
+
# See bug reports 8302 adn 7805
|
111
|
+
@class.stub(:existing_private_class_method) { :stub_value }
|
112
|
+
@class.rspec_reset
|
113
|
+
@class.send(:existing_private_class_method).should eq(:original_value)
|
114
|
+
end
|
112
115
|
end
|
113
116
|
|
114
|
-
it "
|
115
|
-
@
|
116
|
-
@
|
117
|
-
@
|
118
|
-
@
|
119
|
-
@class.existing_class_method.should equal(:original_value)
|
117
|
+
it "returns values in order to consecutive calls" do
|
118
|
+
@instance.stub(:msg).and_return("1",2,:three)
|
119
|
+
@instance.msg.should eq("1")
|
120
|
+
@instance.msg.should eq(2)
|
121
|
+
@instance.msg.should eq(:three)
|
120
122
|
end
|
121
123
|
|
122
|
-
it "
|
123
|
-
@
|
124
|
-
@
|
125
|
-
@
|
126
|
-
@
|
127
|
-
@
|
124
|
+
it "keeps returning last value in consecutive calls" do
|
125
|
+
@instance.stub(:msg).and_return("1",2,:three)
|
126
|
+
@instance.msg.should eq("1")
|
127
|
+
@instance.msg.should eq(2)
|
128
|
+
@instance.msg.should eq(:three)
|
129
|
+
@instance.msg.should eq(:three)
|
130
|
+
@instance.msg.should eq(:three)
|
128
131
|
end
|
129
132
|
|
130
133
|
it "yields a specified object" do
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "a double receiving to_ary" do
|
4
|
+
shared_examples "to_ary" do
|
5
|
+
it "returns nil" do
|
6
|
+
expect do
|
7
|
+
obj.to_ary.should be_nil
|
8
|
+
end.to raise_error(NoMethodError)
|
9
|
+
end
|
10
|
+
|
11
|
+
it "can be overridden with a stub" do
|
12
|
+
obj.stub(:to_ary) { :non_nil_value }
|
13
|
+
obj.to_ary.should be(:non_nil_value)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "supports Array#flatten" do
|
17
|
+
obj = double('foo')
|
18
|
+
[obj].flatten.should eq([obj])
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context "double as_null_object" do
|
23
|
+
let(:obj) { double('obj').as_null_object }
|
24
|
+
include_examples "to_ary"
|
25
|
+
end
|
26
|
+
|
27
|
+
context "double without as_null_object" do
|
28
|
+
let(:obj) { double('obj') }
|
29
|
+
include_examples "to_ary"
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-mocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 15424049
|
5
|
+
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
-
|
8
|
+
- 6
|
9
9
|
- 0
|
10
|
-
|
10
|
+
- rc
|
11
|
+
- 2
|
12
|
+
version: 2.6.0.rc2
|
11
13
|
platform: ruby
|
12
14
|
authors:
|
13
15
|
- David Chelimsky
|
@@ -16,7 +18,7 @@ autorequire:
|
|
16
18
|
bindir: bin
|
17
19
|
cert_chain: []
|
18
20
|
|
19
|
-
date: 2011-
|
21
|
+
date: 2011-04-18 00:00:00 -05:00
|
20
22
|
default_executable:
|
21
23
|
dependencies: []
|
22
24
|
|
@@ -32,6 +34,7 @@ files:
|
|
32
34
|
- .autotest
|
33
35
|
- .document
|
34
36
|
- .gitignore
|
37
|
+
- .travis.yml
|
35
38
|
- Gemfile
|
36
39
|
- Guardfile
|
37
40
|
- License.txt
|
@@ -44,23 +47,30 @@ files:
|
|
44
47
|
- features/README.markdown
|
45
48
|
- features/Upgrade.md
|
46
49
|
- features/message_expectations/README.md
|
50
|
+
- features/message_expectations/any_instance.feature
|
47
51
|
- features/message_expectations/block_local_expectations.feature.pending
|
48
52
|
- features/message_expectations/expect_message.feature
|
49
53
|
- features/message_expectations/warn_when_expectation_is_set_on_nil.feature
|
50
54
|
- features/method_stubs/README.md
|
55
|
+
- features/method_stubs/any_instance.feature
|
56
|
+
- features/method_stubs/as_null_object.feature
|
51
57
|
- features/method_stubs/simple_return_value.feature
|
52
58
|
- features/method_stubs/stub_chain.feature
|
53
59
|
- features/method_stubs/stub_implementation.feature
|
60
|
+
- features/method_stubs/to_ary.feature
|
54
61
|
- features/outside_rspec/configuration.feature
|
55
62
|
- features/outside_rspec/standalone.feature
|
63
|
+
- features/step_definitions/additional_cli_steps.rb
|
56
64
|
- features/support/env.rb
|
57
65
|
- lib/rspec/mocks.rb
|
66
|
+
- lib/rspec/mocks/any_instance.rb
|
58
67
|
- lib/rspec/mocks/argument_expectation.rb
|
59
68
|
- lib/rspec/mocks/argument_matchers.rb
|
60
69
|
- lib/rspec/mocks/error_generator.rb
|
61
70
|
- lib/rspec/mocks/errors.rb
|
62
71
|
- lib/rspec/mocks/extensions/instance_exec.rb
|
63
72
|
- lib/rspec/mocks/extensions/marshal.rb
|
73
|
+
- lib/rspec/mocks/extensions/psych.rb
|
64
74
|
- lib/rspec/mocks/framework.rb
|
65
75
|
- lib/rspec/mocks/message_expectation.rb
|
66
76
|
- lib/rspec/mocks/method_double.rb
|
@@ -76,6 +86,7 @@ files:
|
|
76
86
|
- lib/spec/mocks.rb
|
77
87
|
- rspec-mocks.gemspec
|
78
88
|
- spec/rspec/mocks/and_yield_spec.rb
|
89
|
+
- spec/rspec/mocks/any_instance_spec.rb
|
79
90
|
- spec/rspec/mocks/any_number_of_times_spec.rb
|
80
91
|
- spec/rspec/mocks/argument_expectation_spec.rb
|
81
92
|
- spec/rspec/mocks/at_least_spec.rb
|
@@ -87,9 +98,7 @@ files:
|
|
87
98
|
- spec/rspec/mocks/bug_report_496_spec.rb
|
88
99
|
- spec/rspec/mocks/bug_report_600_spec.rb
|
89
100
|
- spec/rspec/mocks/bug_report_7611_spec.rb
|
90
|
-
- spec/rspec/mocks/bug_report_7805_spec.rb
|
91
101
|
- spec/rspec/mocks/bug_report_8165_spec.rb
|
92
|
-
- spec/rspec/mocks/bug_report_8302_spec.rb
|
93
102
|
- spec/rspec/mocks/bug_report_830_spec.rb
|
94
103
|
- spec/rspec/mocks/bug_report_957_spec.rb
|
95
104
|
- spec/rspec/mocks/double_spec.rb
|
@@ -115,6 +124,7 @@ files:
|
|
115
124
|
- spec/rspec/mocks/stub_implementation_spec.rb
|
116
125
|
- spec/rspec/mocks/stub_spec.rb
|
117
126
|
- spec/rspec/mocks/stubbed_message_expectations_spec.rb
|
127
|
+
- spec/rspec/mocks/to_ary_spec.rb
|
118
128
|
- spec/rspec/mocks/twice_counts_spec.rb
|
119
129
|
- spec/rspec/mocks_spec.rb
|
120
130
|
- spec/spec_helper.rb
|
@@ -140,35 +150,43 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
151
|
none: false
|
142
152
|
requirements:
|
143
|
-
- - "
|
153
|
+
- - ">"
|
144
154
|
- !ruby/object:Gem::Version
|
145
|
-
hash:
|
155
|
+
hash: 25
|
146
156
|
segments:
|
147
|
-
-
|
148
|
-
|
157
|
+
- 1
|
158
|
+
- 3
|
159
|
+
- 1
|
160
|
+
version: 1.3.1
|
149
161
|
requirements: []
|
150
162
|
|
151
163
|
rubyforge_project: rspec
|
152
|
-
rubygems_version: 1.
|
164
|
+
rubygems_version: 1.5.2
|
153
165
|
signing_key:
|
154
166
|
specification_version: 3
|
155
|
-
summary: rspec-mocks-2.
|
167
|
+
summary: rspec-mocks-2.6.0.rc2
|
156
168
|
test_files:
|
157
169
|
- features/Changelog.md
|
158
170
|
- features/README.markdown
|
159
171
|
- features/Upgrade.md
|
160
172
|
- features/message_expectations/README.md
|
173
|
+
- features/message_expectations/any_instance.feature
|
161
174
|
- features/message_expectations/block_local_expectations.feature.pending
|
162
175
|
- features/message_expectations/expect_message.feature
|
163
176
|
- features/message_expectations/warn_when_expectation_is_set_on_nil.feature
|
164
177
|
- features/method_stubs/README.md
|
178
|
+
- features/method_stubs/any_instance.feature
|
179
|
+
- features/method_stubs/as_null_object.feature
|
165
180
|
- features/method_stubs/simple_return_value.feature
|
166
181
|
- features/method_stubs/stub_chain.feature
|
167
182
|
- features/method_stubs/stub_implementation.feature
|
183
|
+
- features/method_stubs/to_ary.feature
|
168
184
|
- features/outside_rspec/configuration.feature
|
169
185
|
- features/outside_rspec/standalone.feature
|
186
|
+
- features/step_definitions/additional_cli_steps.rb
|
170
187
|
- features/support/env.rb
|
171
188
|
- spec/rspec/mocks/and_yield_spec.rb
|
189
|
+
- spec/rspec/mocks/any_instance_spec.rb
|
172
190
|
- spec/rspec/mocks/any_number_of_times_spec.rb
|
173
191
|
- spec/rspec/mocks/argument_expectation_spec.rb
|
174
192
|
- spec/rspec/mocks/at_least_spec.rb
|
@@ -180,9 +198,7 @@ test_files:
|
|
180
198
|
- spec/rspec/mocks/bug_report_496_spec.rb
|
181
199
|
- spec/rspec/mocks/bug_report_600_spec.rb
|
182
200
|
- spec/rspec/mocks/bug_report_7611_spec.rb
|
183
|
-
- spec/rspec/mocks/bug_report_7805_spec.rb
|
184
201
|
- spec/rspec/mocks/bug_report_8165_spec.rb
|
185
|
-
- spec/rspec/mocks/bug_report_8302_spec.rb
|
186
202
|
- spec/rspec/mocks/bug_report_830_spec.rb
|
187
203
|
- spec/rspec/mocks/bug_report_957_spec.rb
|
188
204
|
- spec/rspec/mocks/double_spec.rb
|
@@ -208,6 +224,7 @@ test_files:
|
|
208
224
|
- spec/rspec/mocks/stub_implementation_spec.rb
|
209
225
|
- spec/rspec/mocks/stub_spec.rb
|
210
226
|
- spec/rspec/mocks/stubbed_message_expectations_spec.rb
|
227
|
+
- spec/rspec/mocks/to_ary_spec.rb
|
211
228
|
- spec/rspec/mocks/twice_counts_spec.rb
|
212
229
|
- spec/rspec/mocks_spec.rb
|
213
230
|
- spec/spec_helper.rb
|