rr 0.6.0 → 0.7.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.
- data/CHANGES +10 -0
- data/README.rdoc +56 -18
- data/Rakefile +1 -2
- data/lib/rr.rb +14 -5
- data/lib/rr/adapters/rr_methods.rb +11 -0
- data/lib/rr/adapters/rspec.rb +30 -0
- data/lib/rr/adapters/test_unit.rb +4 -0
- data/lib/rr/double.rb +79 -227
- data/lib/rr/double_definitions/child_double_definition_creator.rb +4 -0
- data/lib/rr/double_definitions/double_definition.rb +138 -4
- data/lib/rr/double_definitions/double_definition_creator.rb +18 -4
- data/lib/rr/double_definitions/double_definition_creator_proxy.rb +35 -3
- data/lib/rr/double_definitions/strategies/implementation/strongly_typed_reimplementation.rb +17 -0
- data/lib/rr/double_definitions/strategies/scope/instance_of_class.rb +3 -0
- data/lib/rr/double_injection.rb +10 -6
- data/lib/rr/errors/spy_verification_errors/double_injection_not_found_error.rb +8 -0
- data/lib/rr/errors/spy_verification_errors/invocation_count_error.rb +8 -0
- data/lib/rr/errors/spy_verification_errors/spy_verification_error.rb +8 -0
- data/lib/rr/errors/subject_does_not_implement_method_error.rb +6 -0
- data/lib/rr/errors/subject_has_different_arity_error.rb +6 -0
- data/lib/rr/expectations/times_called_expectation.rb +11 -9
- data/lib/rr/recorded_calls.rb +103 -0
- data/lib/rr/space.rb +18 -8
- data/lib/rr/spy_verification.rb +48 -0
- data/lib/rr/spy_verification_proxy.rb +18 -0
- data/lib/rr/times_called_matchers/any_times_matcher.rb +2 -3
- data/lib/rr/times_called_matchers/at_least_matcher.rb +2 -3
- data/lib/rr/times_called_matchers/at_most_matcher.rb +2 -3
- data/lib/rr/times_called_matchers/times_called_matcher.rb +4 -4
- data/spec/core_spec_suite.rb +1 -0
- data/spec/high_level_spec.rb +151 -14
- data/spec/rr/adapters/rr_methods_space_spec.rb +2 -2
- data/spec/rr/double_definitions/child_double_definition_creator_spec.rb +9 -0
- data/spec/rr/double_definitions/double_definition_creator_proxy_spec.rb +91 -19
- data/spec/rr/double_definitions/double_definition_creator_spec.rb +7 -0
- data/spec/rr/double_definitions/double_definition_spec.rb +53 -10
- data/spec/rr/double_injection/double_injection_dispatching_spec.rb +14 -15
- data/spec/rr/double_injection/double_injection_verify_spec.rb +1 -1
- data/spec/rr/double_spec.rb +79 -445
- data/spec/rr/errors/rr_error_spec.rb +49 -47
- data/spec/rr/expectations/times_called_expectation/times_called_expectation_any_times_spec.rb +4 -3
- data/spec/rr/expectations/times_called_expectation/times_called_expectation_at_least_spec.rb +3 -2
- data/spec/rr/expectations/times_called_expectation/times_called_expectation_at_most_spec.rb +3 -2
- data/spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb +2 -2
- data/spec/rr/expectations/times_called_expectation/times_called_expectation_integer_spec.rb +3 -3
- data/spec/rr/expectations/times_called_expectation/times_called_expectation_proc_spec.rb +6 -5
- data/spec/rr/expectations/times_called_expectation/times_called_expectation_range_spec.rb +3 -2
- data/spec/rr/expectations/times_called_expectation/times_called_expectation_spec.rb +3 -2
- data/spec/rr/rspec/invocation_matcher_spec.rb +259 -0
- data/spec/rr/rspec/rspec_adapter_spec.rb +1 -1
- data/spec/rr/rspec/rspec_usage_spec.rb +43 -24
- data/spec/rr/space/hash_with_object_id_key_spec.rb +2 -2
- data/spec/rr/space/space_spec.rb +27 -9
- data/spec/rr/test_unit/test_unit_integration_test.rb +10 -0
- data/spec/spec_helper.rb +4 -1
- data/spec/spy_verification_spec.rb +129 -0
- metadata +100 -88
@@ -1,67 +1,86 @@
|
|
1
1
|
require File.expand_path("#{File.dirname(__FILE__)}/../../spec_helper")
|
2
2
|
|
3
3
|
describe RR do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
attr_reader :subject
|
5
|
+
before do
|
6
|
+
@subject = Object.new
|
7
|
+
end
|
8
8
|
|
9
|
+
describe "#mock" do
|
9
10
|
it "creates a mock DoubleInjection Double" do
|
10
|
-
mock(
|
11
|
-
|
11
|
+
mock(subject).foobar(1, 2) {:baz}
|
12
|
+
subject.foobar(1, 2).should == :baz
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
15
16
|
describe "#stub" do
|
16
|
-
before do
|
17
|
-
@subject = Object.new
|
18
|
-
end
|
19
|
-
|
20
17
|
it "creates a stub DoubleInjection Double" do
|
21
|
-
stub(
|
22
|
-
|
18
|
+
stub(subject).foobar {:baz}
|
19
|
+
subject.foobar("any", "thing").should == :baz
|
23
20
|
end
|
24
21
|
end
|
25
22
|
|
26
23
|
describe "#mock and #proxy" do
|
27
24
|
before do
|
28
|
-
|
29
|
-
def @subject.foobar
|
25
|
+
def subject.foobar
|
30
26
|
:baz
|
31
27
|
end
|
32
28
|
end
|
33
29
|
|
34
30
|
it "creates a proxy DoubleInjection Double" do
|
35
|
-
mock.proxy(
|
36
|
-
|
31
|
+
mock.proxy(subject).foobar
|
32
|
+
subject.foobar.should == :baz
|
37
33
|
end
|
38
34
|
end
|
39
35
|
|
40
36
|
describe "#stub and #proxy" do
|
41
37
|
before do
|
42
|
-
|
43
|
-
def @subject.foobar
|
38
|
+
def subject.foobar
|
44
39
|
:baz
|
45
40
|
end
|
46
41
|
end
|
47
42
|
|
48
43
|
it "creates a proxy DoubleInjection Double" do
|
49
|
-
stub.proxy(
|
50
|
-
|
44
|
+
stub.proxy(subject).foobar
|
45
|
+
subject.foobar.should == :baz
|
51
46
|
end
|
52
47
|
end
|
53
48
|
|
54
49
|
describe "#stub and #proxy" do
|
55
50
|
before do
|
56
|
-
|
57
|
-
def @subject.foobar
|
51
|
+
def subject.foobar
|
58
52
|
:baz
|
59
53
|
end
|
60
54
|
end
|
61
55
|
|
62
56
|
it "creates a proxy DoubleInjection Double" do
|
63
|
-
stub.proxy(
|
64
|
-
|
57
|
+
stub.proxy(subject).foobar
|
58
|
+
subject.foobar.should == :baz
|
65
59
|
end
|
66
60
|
end
|
61
|
+
|
62
|
+
describe "spies" do
|
63
|
+
it "validates that a Double was called after it was called" do
|
64
|
+
stub(subject).foobar
|
65
|
+
subject.foobar(1, 2)
|
66
|
+
|
67
|
+
subject.should have_received.foobar(1, 2)
|
68
|
+
lambda do
|
69
|
+
subject.should have_received.foobar(1, 2, 3)
|
70
|
+
end.should raise_error(Spec::Expectations::ExpectationNotMetError)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
it "creates an invocation matcher with a method name" do
|
75
|
+
method = :test
|
76
|
+
matcher = 'fake'
|
77
|
+
mock(RR::Adapters::Rspec::InvocationMatcher).new(method) { matcher }
|
78
|
+
have_received(method).should == matcher
|
79
|
+
end
|
80
|
+
|
81
|
+
it "creates an invocation matcher without a method name" do
|
82
|
+
matcher = 'fake'
|
83
|
+
mock(RR::Adapters::Rspec::InvocationMatcher).new(nil) { matcher }
|
84
|
+
have_received.should == matcher
|
85
|
+
end
|
67
86
|
end
|
@@ -77,11 +77,11 @@ module RR
|
|
77
77
|
end
|
78
78
|
|
79
79
|
it "returns true when the key is in the Hash" do
|
80
|
-
@hash.
|
80
|
+
@hash.include?(@key).should be_true
|
81
81
|
end
|
82
82
|
|
83
83
|
it "returns false when the key is not in the Hash" do
|
84
|
-
@hash.
|
84
|
+
@hash.include?(Object.new).should be_false
|
85
85
|
end
|
86
86
|
end
|
87
87
|
end
|
data/spec/rr/space/space_spec.rb
CHANGED
@@ -22,7 +22,16 @@ module RR
|
|
22
22
|
create_double_args.should == [:foo, :bar]
|
23
23
|
end
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
|
+
describe "#record_call" do
|
27
|
+
it "should add a call to the list" do
|
28
|
+
object = Object.new
|
29
|
+
block = lambda {}
|
30
|
+
space.record_call(object,:to_s,[], block)
|
31
|
+
space.recorded_calls.should == RR::RecordedCalls.new([[object,:to_s,[], block]])
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
26
35
|
describe "#double_injection" do
|
27
36
|
context "when existing subject == but not === with the same method name" do
|
28
37
|
it "creates a new DoubleInjection" do
|
@@ -99,6 +108,14 @@ module RR
|
|
99
108
|
@subject_2 = Object.new
|
100
109
|
@method_name = :foobar
|
101
110
|
end
|
111
|
+
|
112
|
+
it "should clear the #recorded_calls" do
|
113
|
+
object = Object.new
|
114
|
+
space.record_call(object,:to_s,[], nil)
|
115
|
+
|
116
|
+
space.reset
|
117
|
+
space.recorded_calls.should == RR::RecordedCalls.new([])
|
118
|
+
end
|
102
119
|
|
103
120
|
it "removes the ordered doubles" do
|
104
121
|
double_1 = new_double(
|
@@ -109,8 +126,8 @@ module RR
|
|
109
126
|
space.double_injection(subject_2, :foobar2),
|
110
127
|
RR::DoubleDefinitions::DoubleDefinition.new(creator = Object.new, subject_2)
|
111
128
|
)
|
112
|
-
double_1.ordered
|
113
|
-
double_2.ordered
|
129
|
+
double_1.definition.ordered
|
130
|
+
double_2.definition.ordered
|
114
131
|
|
115
132
|
space.ordered_doubles.should_not be_empty
|
116
133
|
|
@@ -457,7 +474,7 @@ module RR
|
|
457
474
|
double = new_double
|
458
475
|
space.register_ordered_double(double)
|
459
476
|
|
460
|
-
double.any_number_of_times
|
477
|
+
double.definition.any_number_of_times
|
461
478
|
double.should_not be_terminal
|
462
479
|
|
463
480
|
lambda do
|
@@ -475,7 +492,7 @@ module RR
|
|
475
492
|
double = new_double
|
476
493
|
space.register_ordered_double(double)
|
477
494
|
|
478
|
-
double.twice
|
495
|
+
double.definition.twice
|
479
496
|
double.should be_attempt
|
480
497
|
|
481
498
|
space.verify_ordered_double(double)
|
@@ -487,7 +504,7 @@ module RR
|
|
487
504
|
double = new_double
|
488
505
|
space.register_ordered_double(double)
|
489
506
|
|
490
|
-
double.with(1).once
|
507
|
+
double.definition.with(1).once
|
491
508
|
subject.foobar(1)
|
492
509
|
double.should_not be_attempt
|
493
510
|
|
@@ -514,9 +531,10 @@ module RR
|
|
514
531
|
end
|
515
532
|
|
516
533
|
def new_double
|
517
|
-
double = super
|
518
|
-
|
519
|
-
|
534
|
+
double = super
|
535
|
+
double.definition.once
|
536
|
+
space.register_ordered_double(double)
|
537
|
+
double
|
520
538
|
end
|
521
539
|
end
|
522
540
|
end
|
@@ -44,4 +44,14 @@ class TestUnitIntegrationTest < Test::Unit::TestCase
|
|
44
44
|
teardown
|
45
45
|
end
|
46
46
|
end
|
47
|
+
|
48
|
+
def test_using_assert_received
|
49
|
+
stub(@subject).foobar(1, 2)
|
50
|
+
@subject.foobar(1, 2)
|
51
|
+
assert_received(@subject) {|subject| subject.foobar(1, 2)}
|
52
|
+
|
53
|
+
assert_raise(RR::Errors::SpyVerificationErrors::InvocationCountError) do
|
54
|
+
assert_received(@subject) {|subject| subject.foobar(1, 2, 3)}
|
55
|
+
end
|
56
|
+
end
|
47
57
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -21,7 +21,10 @@ describe "Swapped Space", :shared => true do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
module Spec::Example::ExampleMethods
|
24
|
-
def new_double(
|
24
|
+
def new_double(
|
25
|
+
double_injection=double_injection,
|
26
|
+
double_definition=RR::DoubleDefinitions::DoubleDefinition.new(creator = RR::DoubleDefinitions::DoubleDefinitionCreator.new, subject).with_any_args.any_number_of_times
|
27
|
+
)
|
25
28
|
RR::Double.new(
|
26
29
|
double_injection,
|
27
30
|
double_definition
|
@@ -0,0 +1,129 @@
|
|
1
|
+
require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")
|
2
|
+
|
3
|
+
class Alpha
|
4
|
+
def bob
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
describe RR::SpyVerification do
|
9
|
+
attr_reader :subject, :recorded_calls
|
10
|
+
it_should_behave_like "Swapped Space"
|
11
|
+
before(:each) do
|
12
|
+
@subject = Object.new
|
13
|
+
extend RR::Adapters::RRMethods
|
14
|
+
stub(subject).foobar
|
15
|
+
@recorded_calls = RR::RecordedCalls.new([[subject, :foobar, [1, 2], nil]])
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "#call" do
|
19
|
+
context "when a subject is expected to receive a method with exact arguments" do
|
20
|
+
context "when the number of times the subject received a method is not specified" do
|
21
|
+
context "when there is an exact match one time" do
|
22
|
+
it "verifies that the method with arguments was called once" do
|
23
|
+
subject.foobar(1, 2)
|
24
|
+
received(subject).foobar(1, 2).call
|
25
|
+
subject.foobar(1, 2)
|
26
|
+
lambda do
|
27
|
+
received(subject).foobar(1, 2).call
|
28
|
+
end.should raise_error(RR::Errors::SpyVerificationErrors::InvocationCountError)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context "when the number of times the subject received a method is specified" do
|
34
|
+
context "as one time" do
|
35
|
+
it "verifies that the method with arugments was called once" do
|
36
|
+
subject.foobar(1, 2)
|
37
|
+
received(subject).foobar(1, 2).once.call
|
38
|
+
subject.foobar(1, 2)
|
39
|
+
lambda do
|
40
|
+
received(subject).foobar(1, 2).once.call
|
41
|
+
end.should raise_error(RR::Errors::SpyVerificationErrors::InvocationCountError)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
context "as an at least matcher" do
|
46
|
+
it "verifies that the method with arugments was called at least the specified number of times" do
|
47
|
+
subject.foobar(1, 2)
|
48
|
+
lambda do
|
49
|
+
received(subject).foobar(1, 2).at_least(2).call
|
50
|
+
end.should raise_error(RR::Errors::SpyVerificationErrors::InvocationCountError)
|
51
|
+
subject.foobar(1, 2)
|
52
|
+
received(subject).foobar(1, 2).at_least(2).call
|
53
|
+
subject.foobar(1, 2)
|
54
|
+
received(subject).foobar(1, 2).at_least(2).call
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context "when a subject is expected to receive a method with wildcard arguments" do
|
61
|
+
context "when the number of times the subject received a method is not specified" do
|
62
|
+
context "when there is a wildcard match one time" do
|
63
|
+
it "verifies that the method with arguments was called once" do
|
64
|
+
subject.foobar(1, 2)
|
65
|
+
received(subject).foobar(1, is_a(Fixnum)).call
|
66
|
+
subject.foobar(1, 2)
|
67
|
+
lambda do
|
68
|
+
received(subject).foobar(1, is_a(Fixnum)).call
|
69
|
+
end.should raise_error(RR::Errors::SpyVerificationErrors::InvocationCountError)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
context "when the number of times the subject received a method is specified" do
|
75
|
+
context "as one time" do
|
76
|
+
it "verifies that the method with arugments was called once" do
|
77
|
+
subject.foobar(1, 2)
|
78
|
+
received(subject).foobar(1, is_a(Fixnum)).once.call
|
79
|
+
subject.foobar(1, 2)
|
80
|
+
lambda do
|
81
|
+
received(subject).foobar(1, is_a(Fixnum)).once.call
|
82
|
+
end.should raise_error(RR::Errors::SpyVerificationErrors::InvocationCountError)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
context "as an at least matcher" do
|
87
|
+
it "verifies that the method with arugments was called at least the specified number of times" do
|
88
|
+
subject.foobar(1, is_a(Fixnum))
|
89
|
+
lambda do
|
90
|
+
received(subject).foobar(1, is_a(Fixnum)).at_least(2).call
|
91
|
+
end.should raise_error(RR::Errors::SpyVerificationErrors::InvocationCountError)
|
92
|
+
subject.foobar(1, 2)
|
93
|
+
received(subject).foobar(1, is_a(Fixnum)).at_least(2).call
|
94
|
+
subject.foobar(1, 2)
|
95
|
+
received(subject).foobar(1, is_a(Fixnum)).at_least(2).call
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
context "when checking for ordering" do
|
102
|
+
it "when the order is incorrect; raises an error" do
|
103
|
+
subject.foobar(3, 4)
|
104
|
+
subject.foobar(1, 2)
|
105
|
+
lambda do
|
106
|
+
received(subject).foobar(1, 2).ordered.call
|
107
|
+
received(subject).foobar(3, 4).ordered.call
|
108
|
+
end.should raise_error(RR::Errors::SpyVerificationErrors::InvocationCountError)
|
109
|
+
end
|
110
|
+
|
111
|
+
it "when the order is correct; does not raise an error" do
|
112
|
+
subject.foobar(1, 2)
|
113
|
+
subject.foobar(1, 2)
|
114
|
+
subject.foobar(3, 4)
|
115
|
+
received(subject).foobar(1, 2).ordered.call
|
116
|
+
received(subject).foobar(3, 4).ordered.call
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
context "when the subject is expected where there is not DoubleInjection" do
|
121
|
+
it "raises a DoubleInjectionNotFoundError" do
|
122
|
+
space.double_injection_exists?(subject, :method_that_does_not_exist).should be_false
|
123
|
+
lambda do
|
124
|
+
received(subject).method_that_does_not_exist.call
|
125
|
+
end.should raise_error(RR::Errors::SpyVerificationErrors::DoubleInjectionNotFoundError)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Takita
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-12-14 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -23,123 +23,134 @@ extra_rdoc_files:
|
|
23
23
|
- README.rdoc
|
24
24
|
- CHANGES
|
25
25
|
files:
|
26
|
+
- README.rdoc
|
26
27
|
- Rakefile
|
27
28
|
- CHANGES
|
28
|
-
-
|
29
|
-
- lib/rr.rb
|
30
|
-
- lib/rr/
|
29
|
+
- lib/rr/double_injection.rb
|
30
|
+
- lib/rr/hash_with_object_id_key.rb
|
31
|
+
- lib/rr/wildcard_matchers/hash_including.rb
|
32
|
+
- lib/rr/wildcard_matchers/range.rb
|
33
|
+
- lib/rr/wildcard_matchers/satisfy.rb
|
34
|
+
- lib/rr/wildcard_matchers/regexp.rb
|
35
|
+
- lib/rr/wildcard_matchers/duck_type.rb
|
36
|
+
- lib/rr/wildcard_matchers/is_a.rb
|
37
|
+
- lib/rr/wildcard_matchers/numeric.rb
|
38
|
+
- lib/rr/wildcard_matchers/boolean.rb
|
39
|
+
- lib/rr/wildcard_matchers/anything.rb
|
40
|
+
- lib/rr/errors/subject_does_not_implement_method_error.rb
|
41
|
+
- lib/rr/errors/subject_has_different_arity_error.rb
|
42
|
+
- lib/rr/errors/rr_error.rb
|
43
|
+
- lib/rr/errors/double_order_error.rb
|
44
|
+
- lib/rr/errors/double_not_found_error.rb
|
45
|
+
- lib/rr/errors/times_called_error.rb
|
46
|
+
- lib/rr/errors/double_definition_error.rb
|
47
|
+
- lib/rr/errors/argument_equality_error.rb
|
48
|
+
- lib/rr/errors/spy_verification_errors/invocation_count_error.rb
|
49
|
+
- lib/rr/errors/spy_verification_errors/spy_verification_error.rb
|
50
|
+
- lib/rr/errors/spy_verification_errors/double_injection_not_found_error.rb
|
51
|
+
- lib/rr/adapters/rspec.rb
|
52
|
+
- lib/rr/adapters/test_unit.rb
|
53
|
+
- lib/rr/adapters/rr_methods.rb
|
54
|
+
- lib/rr/times_called_matchers/proc_matcher.rb
|
31
55
|
- lib/rr/times_called_matchers/at_most_matcher.rb
|
32
56
|
- lib/rr/times_called_matchers/times_called_matcher.rb
|
33
|
-
- lib/rr/times_called_matchers/at_least_matcher.rb
|
34
|
-
- lib/rr/times_called_matchers/proc_matcher.rb
|
35
|
-
- lib/rr/times_called_matchers/integer_matcher.rb
|
36
57
|
- lib/rr/times_called_matchers/non_terminal.rb
|
37
58
|
- lib/rr/times_called_matchers/terminal.rb
|
38
59
|
- lib/rr/times_called_matchers/range_matcher.rb
|
39
|
-
- lib/rr/
|
60
|
+
- lib/rr/times_called_matchers/at_least_matcher.rb
|
61
|
+
- lib/rr/times_called_matchers/any_times_matcher.rb
|
62
|
+
- lib/rr/times_called_matchers/integer_matcher.rb
|
63
|
+
- lib/rr/double_matches.rb
|
64
|
+
- lib/rr/double.rb
|
65
|
+
- lib/rr/spy_verification.rb
|
66
|
+
- lib/rr/space.rb
|
67
|
+
- lib/rr/spy_verification_proxy.rb
|
40
68
|
- lib/rr/expectations/argument_equality_expectation.rb
|
41
|
-
- lib/rr/expectations/times_called_expectation.rb
|
42
69
|
- lib/rr/expectations/any_argument_expectation.rb
|
43
|
-
- lib/rr/
|
44
|
-
- lib/rr/double_definitions/
|
70
|
+
- lib/rr/expectations/times_called_expectation.rb
|
71
|
+
- lib/rr/double_definitions/strategies/implementation/strongly_typed_reimplementation.rb
|
72
|
+
- lib/rr/double_definitions/strategies/implementation/reimplementation.rb
|
73
|
+
- lib/rr/double_definitions/strategies/implementation/proxy.rb
|
74
|
+
- lib/rr/double_definitions/strategies/implementation/implementation_strategy.rb
|
75
|
+
- lib/rr/double_definitions/strategies/strategy.rb
|
45
76
|
- lib/rr/double_definitions/strategies/scope/instance_of_class.rb
|
46
77
|
- lib/rr/double_definitions/strategies/scope/instance.rb
|
47
78
|
- lib/rr/double_definitions/strategies/scope/scope_strategy.rb
|
48
|
-
- lib/rr/double_definitions/strategies/verification/mock.rb
|
49
79
|
- lib/rr/double_definitions/strategies/verification/stub.rb
|
50
80
|
- lib/rr/double_definitions/strategies/verification/dont_allow.rb
|
51
81
|
- lib/rr/double_definitions/strategies/verification/verification_strategy.rb
|
52
|
-
- lib/rr/double_definitions/strategies/
|
53
|
-
- lib/rr/double_definitions/strategies/implementation/proxy.rb
|
54
|
-
- lib/rr/double_definitions/strategies/implementation/reimplementation.rb
|
55
|
-
- lib/rr/double_definitions/strategies/implementation/implementation_strategy.rb
|
82
|
+
- lib/rr/double_definitions/strategies/verification/mock.rb
|
56
83
|
- lib/rr/double_definitions/double_definition_creator.rb
|
57
84
|
- lib/rr/double_definitions/double_definition_creator_proxy.rb
|
58
|
-
- lib/rr/
|
59
|
-
- lib/rr/
|
60
|
-
- lib/rr/
|
61
|
-
- lib/rr
|
62
|
-
- lib/rr/errors/rr_error.rb
|
63
|
-
- lib/rr/errors/times_called_error.rb
|
64
|
-
- lib/rr/errors/double_order_error.rb
|
65
|
-
- lib/rr/adapters/rr_methods.rb
|
66
|
-
- lib/rr/adapters/test_unit.rb
|
67
|
-
- lib/rr/adapters/rspec.rb
|
68
|
-
- lib/rr/double_injection.rb
|
69
|
-
- lib/rr/space.rb
|
70
|
-
- lib/rr/wildcard_matchers/boolean.rb
|
71
|
-
- lib/rr/wildcard_matchers/duck_type.rb
|
72
|
-
- lib/rr/wildcard_matchers/range.rb
|
73
|
-
- lib/rr/wildcard_matchers/satisfy.rb
|
74
|
-
- lib/rr/wildcard_matchers/regexp.rb
|
75
|
-
- lib/rr/wildcard_matchers/numeric.rb
|
76
|
-
- lib/rr/wildcard_matchers/is_a.rb
|
77
|
-
- lib/rr/wildcard_matchers/hash_including.rb
|
78
|
-
- lib/rr/wildcard_matchers/anything.rb
|
79
|
-
- lib/rr/double.rb
|
80
|
-
- spec/environment_fixture_setup.rb
|
81
|
-
- spec/spec_suite.rb
|
85
|
+
- lib/rr/double_definitions/double_definition.rb
|
86
|
+
- lib/rr/double_definitions/child_double_definition_creator.rb
|
87
|
+
- lib/rr/recorded_calls.rb
|
88
|
+
- lib/rr.rb
|
82
89
|
- spec/test_unit_spec_suite.rb
|
90
|
+
- spec/rspec_spec_suite.rb
|
91
|
+
- spec/spec_suite.rb
|
92
|
+
- spec/core_spec_suite.rb
|
83
93
|
- spec/spec_helper.rb
|
84
|
-
- spec/
|
85
|
-
- spec/
|
94
|
+
- spec/rr/wildcard_matchers/anything_spec.rb
|
95
|
+
- spec/rr/wildcard_matchers/numeric_spec.rb
|
96
|
+
- spec/rr/wildcard_matchers/is_a_spec.rb
|
97
|
+
- spec/rr/wildcard_matchers/regexp_spec.rb
|
98
|
+
- spec/rr/wildcard_matchers/duck_type_spec.rb
|
99
|
+
- spec/rr/wildcard_matchers/boolean_spec.rb
|
100
|
+
- spec/rr/wildcard_matchers/range_spec.rb
|
101
|
+
- spec/rr/space/hash_with_object_id_key_spec.rb
|
102
|
+
- spec/rr/space/space_spec.rb
|
86
103
|
- spec/rr/rspec/rspec_backtrace_tweaking_spec.rb
|
104
|
+
- spec/rr/rspec/invocation_matcher_spec.rb
|
87
105
|
- spec/rr/rspec/rspec_usage_spec.rb
|
88
106
|
- spec/rr/rspec/rspec_adapter_spec.rb
|
89
|
-
- spec/rr/
|
90
|
-
- spec/rr/
|
91
|
-
- spec/rr/
|
92
|
-
- spec/rr/
|
93
|
-
- spec/rr/
|
94
|
-
- spec/rr/
|
95
|
-
- spec/rr/
|
96
|
-
- spec/rr/
|
107
|
+
- spec/rr/test_unit/test_unit_backtrace_test.rb
|
108
|
+
- spec/rr/test_unit/test_unit_integration_test.rb
|
109
|
+
- spec/rr/test_unit/test_helper.rb
|
110
|
+
- spec/rr/errors/rr_error_spec.rb
|
111
|
+
- spec/rr/adapters/rr_methods_creator_spec.rb
|
112
|
+
- spec/rr/adapters/rr_methods_times_matcher_spec.rb
|
113
|
+
- spec/rr/adapters/rr_methods_spec_helper.rb
|
114
|
+
- spec/rr/adapters/rr_methods_argument_matcher_spec.rb
|
115
|
+
- spec/rr/adapters/rr_methods_space_spec.rb
|
116
|
+
- spec/rr/times_called_matchers/integer_matcher_spec.rb
|
97
117
|
- spec/rr/times_called_matchers/any_times_matcher_spec.rb
|
98
118
|
- spec/rr/times_called_matchers/range_matcher_spec.rb
|
119
|
+
- spec/rr/times_called_matchers/proc_matcher_spec.rb
|
99
120
|
- spec/rr/times_called_matchers/times_called_matcher_spec.rb
|
100
121
|
- spec/rr/times_called_matchers/at_least_matcher_spec.rb
|
101
122
|
- spec/rr/times_called_matchers/at_most_matcher_spec.rb
|
102
|
-
- spec/rr/
|
103
|
-
- spec/rr/
|
104
|
-
- spec/rr/
|
105
|
-
- spec/rr/
|
106
|
-
- spec/rr/
|
107
|
-
- spec/rr/
|
108
|
-
- spec/rr/
|
109
|
-
- spec/rr/expectations/times_called_expectation/times_called_expectation_integer_spec.rb
|
110
|
-
- spec/rr/expectations/times_called_expectation/times_called_expectation_spec.rb
|
111
|
-
- spec/rr/expectations/times_called_expectation/times_called_expectation_at_most_spec.rb
|
112
|
-
- spec/rr/expectations/times_called_expectation/times_called_expectation_range_spec.rb
|
113
|
-
- spec/rr/expectations/times_called_expectation/times_called_expectation_any_times_spec.rb
|
114
|
-
- spec/rr/expectations/boolean_argument_equality_expectation_spec.rb
|
123
|
+
- spec/rr/double_spec.rb
|
124
|
+
- spec/rr/double_injection/double_injection_spec.rb
|
125
|
+
- spec/rr/double_injection/double_injection_reset_spec.rb
|
126
|
+
- spec/rr/double_injection/double_injection_has_original_method_spec.rb
|
127
|
+
- spec/rr/double_injection/double_injection_bind_spec.rb
|
128
|
+
- spec/rr/double_injection/double_injection_dispatching_spec.rb
|
129
|
+
- spec/rr/double_injection/double_injection_verify_spec.rb
|
115
130
|
- spec/rr/expectations/anything_argument_equality_expectation_spec.rb
|
116
131
|
- spec/rr/expectations/satisfy_argument_equality_expectation_spec.rb
|
117
132
|
- spec/rr/expectations/any_argument_expectation_spec.rb
|
133
|
+
- spec/rr/expectations/times_called_expectation/times_called_expectation_spec.rb
|
134
|
+
- spec/rr/expectations/times_called_expectation/times_called_expectation_at_least_spec.rb
|
135
|
+
- spec/rr/expectations/times_called_expectation/times_called_expectation_proc_spec.rb
|
136
|
+
- spec/rr/expectations/times_called_expectation/times_called_expectation_at_most_spec.rb
|
137
|
+
- spec/rr/expectations/times_called_expectation/times_called_expectation_any_times_spec.rb
|
138
|
+
- spec/rr/expectations/times_called_expectation/times_called_expectation_range_spec.rb
|
139
|
+
- spec/rr/expectations/times_called_expectation/times_called_expectation_integer_spec.rb
|
140
|
+
- spec/rr/expectations/times_called_expectation/times_called_expectation_helper.rb
|
141
|
+
- spec/rr/expectations/hash_including_argument_equality_expectation_spec.rb
|
142
|
+
- spec/rr/expectations/satisfy_spec.rb
|
118
143
|
- spec/rr/expectations/hash_including_spec.rb
|
119
144
|
- spec/rr/expectations/argument_equality_expectation_spec.rb
|
120
|
-
- spec/rr/expectations/
|
145
|
+
- spec/rr/expectations/boolean_argument_equality_expectation_spec.rb
|
121
146
|
- spec/rr/double_definitions/child_double_definition_creator_spec.rb
|
122
|
-
- spec/rr/double_definitions/double_definition_spec.rb
|
123
|
-
- spec/rr/double_definitions/double_definition_creator_proxy_spec.rb
|
124
147
|
- spec/rr/double_definitions/double_definition_creator_spec.rb
|
125
|
-
- spec/rr/
|
126
|
-
- spec/rr/
|
127
|
-
- spec/
|
128
|
-
- spec/
|
129
|
-
- spec/
|
130
|
-
- spec/
|
131
|
-
- spec/rr/wildcard_matchers/numeric_spec.rb
|
132
|
-
- spec/rr/wildcard_matchers/duck_type_spec.rb
|
133
|
-
- spec/rr/wildcard_matchers/boolean_spec.rb
|
134
|
-
- spec/rr/wildcard_matchers/range_spec.rb
|
135
|
-
- spec/rr/wildcard_matchers/regexp_spec.rb
|
136
|
-
- spec/rr/wildcard_matchers/is_a_spec.rb
|
137
|
-
- spec/rr/wildcard_matchers/anything_spec.rb
|
138
|
-
- spec/rr/test_unit/test_unit_backtrace_test.rb
|
139
|
-
- spec/rr/test_unit/test_helper.rb
|
140
|
-
- spec/rr/test_unit/test_unit_integration_test.rb
|
141
|
-
- spec/rspec_spec_suite.rb
|
142
|
-
- spec/core_spec_suite.rb
|
148
|
+
- spec/rr/double_definitions/double_definition_creator_proxy_spec.rb
|
149
|
+
- spec/rr/double_definitions/double_definition_spec.rb
|
150
|
+
- spec/rr_spec.rb
|
151
|
+
- spec/high_level_spec.rb
|
152
|
+
- spec/spy_verification_spec.rb
|
153
|
+
- spec/environment_fixture_setup.rb
|
143
154
|
has_rdoc: true
|
144
155
|
homepage: http://pivotallabs.com
|
145
156
|
post_install_message:
|
@@ -165,10 +176,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
176
|
requirements: []
|
166
177
|
|
167
178
|
rubyforge_project: pivotalrb
|
168
|
-
rubygems_version: 1.
|
179
|
+
rubygems_version: 1.3.1
|
169
180
|
signing_key:
|
170
181
|
specification_version: 2
|
171
182
|
summary: RR (Double Ruby) is a double framework that features a rich selection of double techniques and a terse syntax. http://xunitpatterns.com/Test%20Double.html
|
172
183
|
test_files:
|
173
|
-
- spec/high_level_spec.rb
|
174
184
|
- spec/rr_spec.rb
|
185
|
+
- spec/high_level_spec.rb
|
186
|
+
- spec/spy_verification_spec.rb
|