bogus 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.travis.yml +1 -1
- data/Guardfile +1 -3
- data/Guardfile.cucumber +0 -2
- data/README.md +1 -1
- data/bogus.gemspec +3 -1
- data/features/changelog.md +11 -0
- data/features/configuration/fake_ar_attributes.feature +2 -2
- data/features/contract_tests/contract_tests_mocks.feature +5 -5
- data/features/contract_tests/contract_tests_spies.feature +1 -1
- data/features/contract_tests/contract_tests_stubs.feature +6 -6
- data/features/contract_tests/custom_overwritten_class.feature +4 -4
- data/features/contract_tests/return_value_contracts.feature +2 -2
- data/features/fakes/anonymous_doubles.feature +5 -5
- data/features/fakes/duck_types.feature +9 -9
- data/features/fakes/fake_objects.feature +31 -8
- data/features/fakes/global_fake_configuration.feature +5 -5
- data/features/fakes/replacing_classes.feature +5 -5
- data/features/readme.md +5 -5
- data/features/safe_stubbing/argument_matchers.feature +23 -10
- data/features/safe_stubbing/safe_mocking.feature +1 -1
- data/features/safe_stubbing/safe_stubbing.feature +1 -1
- data/features/safe_stubbing/spies.feature +7 -7
- data/lib/bogus.rb +1 -0
- data/lib/bogus/core_ext.rb +22 -0
- data/lib/bogus/fakes/fake.rb +2 -1
- data/lib/bogus/fakes/method_stringifier.rb +1 -0
- data/lib/bogus/mocking_dsl.rb +4 -0
- data/lib/bogus/stubbing/has_overwritten_methods.rb +28 -10
- data/lib/bogus/stubbing/have_received_matcher.rb +4 -2
- data/lib/bogus/stubbing/matchers/any_args.rb +9 -0
- data/lib/bogus/stubbing/matchers/matches_argument.rb +11 -0
- data/lib/bogus/stubbing/{any_args.rb → matchers/with_arguments.rb} +0 -6
- data/lib/bogus/stubbing/overwrites_methods.rb +6 -1
- data/lib/bogus/stubbing/undefined_return_value.rb +4 -0
- data/lib/bogus/support.rb +11 -0
- data/lib/bogus/version.rb +1 -1
- data/spec/bogus/clean_ruby_spec.rb +1 -1
- data/spec/bogus/configuration_spec.rb +2 -2
- data/spec/bogus/contracts/adds_contract_verification_spec.rb +10 -10
- data/spec/bogus/contracts/adds_recording_spec.rb +4 -4
- data/spec/bogus/contracts/interactions_repository_spec.rb +15 -15
- data/spec/bogus/contracts/proxy_class_spec.rb +7 -7
- data/spec/bogus/contracts/records_double_interactions_spec.rb +1 -1
- data/spec/bogus/contracts/verifies_contracts_spec.rb +3 -3
- data/spec/bogus/fakes/base_class_identifier_spec.rb +1 -1
- data/spec/bogus/fakes/class_methods_spec.rb +4 -5
- data/spec/bogus/fakes/converts_name_to_class_spec.rb +3 -3
- data/spec/bogus/fakes/copies_classes_spec.rb +20 -16
- data/spec/bogus/fakes/creates_fakes_spec.rb +6 -6
- data/spec/bogus/fakes/creates_fakes_with_stubbed_methods_spec.rb +16 -15
- data/spec/bogus/fakes/fake_ar_attributes_spec.rb +3 -3
- data/spec/bogus/fakes/fake_configuration_spec.rb +16 -16
- data/spec/bogus/fakes/fake_registry_spec.rb +2 -2
- data/spec/bogus/fakes/fake_spec.rb +1 -1
- data/spec/bogus/fakes/fakes_classes_spec.rb +4 -4
- data/spec/bogus/fakes/faking_factories_spec.rb +4 -4
- data/spec/bogus/fakes/frozen_fakes_spec.rb +4 -4
- data/spec/bogus/fakes/instance_methods_spec.rb +5 -5
- data/spec/bogus/fakes/makes_ducks_spec.rb +3 -3
- data/spec/bogus/fakes/makes_substitute_methods_spec.rb +1 -1
- data/spec/bogus/fakes/overwriten_classes_spec.rb +3 -3
- data/spec/bogus/fakes/overwrites_classes_spec.rb +2 -2
- data/spec/bogus/fakes/registers_created_fakes_spec.rb +3 -3
- data/spec/bogus/fakes/resets_overwritten_classes_spec.rb +3 -3
- data/spec/bogus/fakes/stubbing_new_method_on_fake_class_spec.rb +25 -0
- data/spec/bogus/mocking_dsl_spec.rb +36 -36
- data/spec/bogus/ruby_2_1_support_spec.rb +38 -0
- data/spec/bogus/ruby_2_support_spec.rb +14 -64
- data/spec/bogus/stubbing/anything_spec.rb +5 -5
- data/spec/bogus/stubbing/double_spec.rb +2 -2
- data/spec/bogus/stubbing/have_received_matcher_spec.rb +11 -6
- data/spec/bogus/stubbing/interaction_spec.rb +7 -7
- data/spec/bogus/stubbing/multi_stubber_spec.rb +2 -2
- data/spec/bogus/stubbing/overwrites_methods_spec.rb +8 -8
- data/spec/bogus/stubbing/record_interactions_spec.rb +3 -3
- data/spec/bogus/stubbing/shadow_spec.rb +28 -28
- data/spec/bogus/stubbing/stubbing_existing_methods_on_fakes_spec.rb +50 -0
- data/spec/bogus/stubbing/tracks_existence_of_test_doubles_spec.rb +2 -2
- data/spec/bogus/stubbing/undefined_return_value_spec.rb +2 -2
- data/spec/spec_helper.rb +6 -1
- data/spec/support/shared_examples_for_keyword_arguments.rb +63 -0
- metadata +160 -160
- data/Gemfile.lock +0 -146
@@ -4,7 +4,7 @@ describe Bogus::TracksExistenceOfTestDoubles do
|
|
4
4
|
let(:tracker) { Bogus::TracksExistenceOfTestDoubles.new }
|
5
5
|
|
6
6
|
it "returns an empty double list with nothing tracked" do
|
7
|
-
tracker.doubles.
|
7
|
+
expect(tracker.doubles).to eq([])
|
8
8
|
end
|
9
9
|
|
10
10
|
it "lists the added test doubles in order without duplicates" do
|
@@ -21,6 +21,6 @@ describe Bogus::TracksExistenceOfTestDoubles do
|
|
21
21
|
tracker.track foo
|
22
22
|
|
23
23
|
|
24
|
-
tracker.doubles.
|
24
|
+
expect(tracker.doubles).to eq([foo, bar, baz])
|
25
25
|
end
|
26
26
|
end
|
@@ -5,14 +5,14 @@ describe Bogus::UndefinedReturnValue do
|
|
5
5
|
let(:undefined_return_value) { Bogus::UndefinedReturnValue.new(interaction) }
|
6
6
|
|
7
7
|
it "includes the interaction when stringified" do
|
8
|
-
undefined_return_value.to_s.
|
8
|
+
expect(undefined_return_value.to_s).to include('foo("bar")')
|
9
9
|
end
|
10
10
|
|
11
11
|
it "includes interaction in the error message unknown method called" do
|
12
12
|
begin
|
13
13
|
undefined_return_value.foobar
|
14
14
|
rescue => e
|
15
|
-
e.message.
|
15
|
+
expect(e.message).to include('foo("bar")')
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
require 'simplecov'
|
2
|
-
|
2
|
+
begin
|
3
|
+
require "coveralls"
|
4
|
+
rescue LoadError
|
5
|
+
warn "warning: coveralls gem not found; skipping Coveralls"
|
6
|
+
end
|
3
7
|
|
4
8
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
5
9
|
SimpleCov::Formatter::HTMLFormatter,
|
@@ -17,6 +21,7 @@ require 'rr'
|
|
17
21
|
require_relative 'support/sample_fake'
|
18
22
|
require_relative 'support/fake_creator_of_fakes'
|
19
23
|
require_relative 'support/matchers'
|
24
|
+
require_relative 'support/shared_examples_for_keyword_arguments'
|
20
25
|
|
21
26
|
RSpec.configure do |config|
|
22
27
|
config.color_enabled = true
|
@@ -0,0 +1,63 @@
|
|
1
|
+
shared_examples_for "stubbing methods with keyword arguments" do
|
2
|
+
it "can spy on stubbed methods" do
|
3
|
+
stub(subject).foo(any_args)
|
4
|
+
|
5
|
+
subject.foo(x: "test")
|
6
|
+
|
7
|
+
expect(subject).to have_received.foo(x: "test")
|
8
|
+
expect(subject).not_to have_received.foo(x: "baz")
|
9
|
+
end
|
10
|
+
|
11
|
+
it "can mock methods with keyword arguments" do
|
12
|
+
mock(subject).foo(x: 1) { :return }
|
13
|
+
|
14
|
+
expect(subject.foo(x: 1)).to eq(:return)
|
15
|
+
|
16
|
+
expect { Bogus.after_each_test }.not_to raise_error
|
17
|
+
end
|
18
|
+
|
19
|
+
it "can stub methods with keyword arguments" do
|
20
|
+
stub(subject).foo(x: "bar") { :return_value }
|
21
|
+
|
22
|
+
expect(subject.foo(x: "bar")).to eq(:return_value)
|
23
|
+
end
|
24
|
+
|
25
|
+
it "raises on error on unknown keyword" do
|
26
|
+
expect {
|
27
|
+
stub(subject).foo(x: "bar", baz: "baz")
|
28
|
+
}.to raise_error(ArgumentError)
|
29
|
+
end
|
30
|
+
|
31
|
+
it "does not overwrite the method signature" do
|
32
|
+
stub(subject).foo(x: 1)
|
33
|
+
|
34
|
+
expect {
|
35
|
+
subject.foo(bar: 1)
|
36
|
+
}.to raise_error(ArgumentError)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
shared_examples_for "stubbing methods with double splat" do
|
41
|
+
it "can spy on stubbed methods" do
|
42
|
+
stub(subject).bar(any_args)
|
43
|
+
|
44
|
+
subject.bar(x: "test", z: "spec")
|
45
|
+
|
46
|
+
expect(subject).to have_received.bar(x: "test", z: "spec")
|
47
|
+
expect(subject).not_to have_received.bar(x: "test", y: "baz")
|
48
|
+
end
|
49
|
+
|
50
|
+
it "can mock methods with keyword arguments" do
|
51
|
+
mock(subject).bar(x: 1, z: 2) { :return }
|
52
|
+
|
53
|
+
expect(subject.bar(x: 1, z: 2)).to eq(:return)
|
54
|
+
|
55
|
+
expect { Bogus.after_each_test }.not_to raise_error
|
56
|
+
end
|
57
|
+
|
58
|
+
it "can stub methods with keyword arguments" do
|
59
|
+
stub(subject).bar(x: "bar", z: "bar") { :return_value }
|
60
|
+
|
61
|
+
expect(subject.bar(x: "bar", z: "bar")).to eq(:return_value)
|
62
|
+
end
|
63
|
+
end
|
metadata
CHANGED
@@ -1,203 +1,273 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bogus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Adam Pohorecki
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-04-29 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: dependor
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.0.4
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.4
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: rake
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: rspec
|
38
|
-
requirement:
|
39
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
40
44
|
requirements:
|
41
|
-
- -
|
45
|
+
- - ">="
|
42
46
|
- !ruby/object:Gem::Version
|
43
47
|
version: '0'
|
44
48
|
type: :development
|
45
49
|
prerelease: false
|
46
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: cucumber
|
49
|
-
requirement:
|
50
|
-
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - ">="
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '0'
|
55
62
|
type: :development
|
56
63
|
prerelease: false
|
57
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: aruba
|
60
|
-
requirement:
|
61
|
-
none: false
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
62
72
|
requirements:
|
63
|
-
- -
|
73
|
+
- - ">="
|
64
74
|
- !ruby/object:Gem::Version
|
65
75
|
version: '0'
|
66
76
|
type: :development
|
67
77
|
prerelease: false
|
68
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: guard
|
71
|
-
requirement:
|
72
|
-
none: false
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
73
86
|
requirements:
|
74
|
-
- -
|
87
|
+
- - ">="
|
75
88
|
- !ruby/object:Gem::Version
|
76
89
|
version: '0'
|
77
90
|
type: :development
|
78
91
|
prerelease: false
|
79
|
-
version_requirements:
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
80
97
|
- !ruby/object:Gem::Dependency
|
81
98
|
name: guard-rspec
|
82
|
-
requirement:
|
83
|
-
none: false
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
84
100
|
requirements:
|
85
|
-
- -
|
101
|
+
- - ">="
|
86
102
|
- !ruby/object:Gem::Version
|
87
103
|
version: '0'
|
88
104
|
type: :development
|
89
105
|
prerelease: false
|
90
|
-
version_requirements:
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
91
111
|
- !ruby/object:Gem::Dependency
|
92
112
|
name: guard-cucumber
|
93
|
-
requirement:
|
94
|
-
none: false
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
95
114
|
requirements:
|
96
|
-
- -
|
115
|
+
- - ">="
|
97
116
|
- !ruby/object:Gem::Version
|
98
117
|
version: '0'
|
99
118
|
type: :development
|
100
119
|
prerelease: false
|
101
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
102
125
|
- !ruby/object:Gem::Dependency
|
103
126
|
name: guard-ctags-bundler
|
104
|
-
requirement:
|
105
|
-
none: false
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
106
128
|
requirements:
|
107
|
-
- -
|
129
|
+
- - ">="
|
108
130
|
- !ruby/object:Gem::Version
|
109
131
|
version: '0'
|
110
132
|
type: :development
|
111
133
|
prerelease: false
|
112
|
-
version_requirements:
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
113
139
|
- !ruby/object:Gem::Dependency
|
114
140
|
name: growl
|
115
|
-
requirement:
|
116
|
-
none: false
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
117
142
|
requirements:
|
118
|
-
- -
|
143
|
+
- - ">="
|
119
144
|
- !ruby/object:Gem::Version
|
120
145
|
version: '0'
|
121
146
|
type: :development
|
122
147
|
prerelease: false
|
123
|
-
version_requirements:
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
124
153
|
- !ruby/object:Gem::Dependency
|
125
154
|
name: libnotify
|
126
|
-
requirement:
|
127
|
-
none: false
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
128
156
|
requirements:
|
129
|
-
- -
|
157
|
+
- - ">="
|
130
158
|
- !ruby/object:Gem::Version
|
131
159
|
version: '0'
|
132
160
|
type: :development
|
133
161
|
prerelease: false
|
134
|
-
version_requirements:
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
135
167
|
- !ruby/object:Gem::Dependency
|
136
168
|
name: rr
|
137
|
-
requirement:
|
138
|
-
none: false
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
139
170
|
requirements:
|
140
|
-
- -
|
171
|
+
- - ">="
|
141
172
|
- !ruby/object:Gem::Version
|
142
173
|
version: '0'
|
143
174
|
type: :development
|
144
175
|
prerelease: false
|
145
|
-
version_requirements:
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
146
181
|
- !ruby/object:Gem::Dependency
|
147
182
|
name: relish
|
148
|
-
requirement:
|
149
|
-
none: false
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
150
184
|
requirements:
|
151
|
-
- -
|
185
|
+
- - ">="
|
152
186
|
- !ruby/object:Gem::Version
|
153
187
|
version: '0'
|
154
188
|
type: :development
|
155
189
|
prerelease: false
|
156
|
-
version_requirements:
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
157
195
|
- !ruby/object:Gem::Dependency
|
158
196
|
name: coveralls
|
159
|
-
requirement:
|
160
|
-
none: false
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
161
198
|
requirements:
|
162
|
-
- -
|
199
|
+
- - ">="
|
163
200
|
- !ruby/object:Gem::Version
|
164
201
|
version: '0'
|
165
202
|
type: :development
|
166
203
|
prerelease: false
|
167
|
-
version_requirements:
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
168
209
|
- !ruby/object:Gem::Dependency
|
169
210
|
name: activerecord
|
170
|
-
requirement:
|
171
|
-
none: false
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
172
212
|
requirements:
|
173
|
-
- -
|
213
|
+
- - ">="
|
174
214
|
- !ruby/object:Gem::Version
|
175
|
-
version: '
|
215
|
+
version: '3'
|
216
|
+
- - "<"
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: '5'
|
176
219
|
type: :development
|
177
220
|
prerelease: false
|
178
|
-
version_requirements:
|
221
|
+
version_requirements: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - ">="
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '3'
|
226
|
+
- - "<"
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: '5'
|
179
229
|
- !ruby/object:Gem::Dependency
|
180
230
|
name: activerecord-nulldb-adapter
|
181
|
-
requirement:
|
182
|
-
none: false
|
231
|
+
requirement: !ruby/object:Gem::Requirement
|
183
232
|
requirements:
|
184
|
-
- -
|
233
|
+
- - ">="
|
185
234
|
- !ruby/object:Gem::Version
|
186
235
|
version: '0'
|
187
236
|
type: :development
|
188
237
|
prerelease: false
|
189
|
-
version_requirements:
|
238
|
+
version_requirements: !ruby/object:Gem::Requirement
|
239
|
+
requirements:
|
240
|
+
- - ">="
|
241
|
+
- !ruby/object:Gem::Version
|
242
|
+
version: '0'
|
190
243
|
- !ruby/object:Gem::Dependency
|
191
244
|
name: minitest
|
192
|
-
requirement:
|
193
|
-
|
245
|
+
requirement: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - ">="
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '4.7'
|
250
|
+
type: :development
|
251
|
+
prerelease: false
|
252
|
+
version_requirements: !ruby/object:Gem::Requirement
|
194
253
|
requirements:
|
195
|
-
- -
|
254
|
+
- - ">="
|
196
255
|
- !ruby/object:Gem::Version
|
197
256
|
version: '4.7'
|
257
|
+
- !ruby/object:Gem::Dependency
|
258
|
+
name: rb-readline
|
259
|
+
requirement: !ruby/object:Gem::Requirement
|
260
|
+
requirements:
|
261
|
+
- - "~>"
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
version: 0.5.0
|
198
264
|
type: :development
|
199
265
|
prerelease: false
|
200
|
-
version_requirements:
|
266
|
+
version_requirements: !ruby/object:Gem::Requirement
|
267
|
+
requirements:
|
268
|
+
- - "~>"
|
269
|
+
- !ruby/object:Gem::Version
|
270
|
+
version: 0.5.0
|
201
271
|
description: Decreases the need to write integration tests by ensuring that the things
|
202
272
|
you stub or mock actually exist.
|
203
273
|
email:
|
@@ -206,11 +276,10 @@ executables: []
|
|
206
276
|
extensions: []
|
207
277
|
extra_rdoc_files: []
|
208
278
|
files:
|
209
|
-
- .gitignore
|
210
|
-
- .pelusa.yml
|
211
|
-
- .travis.yml
|
279
|
+
- ".gitignore"
|
280
|
+
- ".pelusa.yml"
|
281
|
+
- ".travis.yml"
|
212
282
|
- Gemfile
|
213
|
-
- Gemfile.lock
|
214
283
|
- Guardfile
|
215
284
|
- Guardfile.cucumber
|
216
285
|
- README.md
|
@@ -255,6 +324,7 @@ files:
|
|
255
324
|
- lib/bogus/contracts/recording_proxy.rb
|
256
325
|
- lib/bogus/contracts/records_double_interactions.rb
|
257
326
|
- lib/bogus/contracts/verifies_contracts.rb
|
327
|
+
- lib/bogus/core_ext.rb
|
258
328
|
- lib/bogus/fake_configuration.rb
|
259
329
|
- lib/bogus/fakes/active_record_accessors.rb
|
260
330
|
- lib/bogus/fakes/base_class_identifier.rb
|
@@ -289,7 +359,6 @@ files:
|
|
289
359
|
- lib/bogus/rspec/adapter.rb
|
290
360
|
- lib/bogus/rspec/extensions.rb
|
291
361
|
- lib/bogus/rspec/syntax.rb
|
292
|
-
- lib/bogus/stubbing/any_args.rb
|
293
362
|
- lib/bogus/stubbing/anything.rb
|
294
363
|
- lib/bogus/stubbing/default_value.rb
|
295
364
|
- lib/bogus/stubbing/double.rb
|
@@ -298,6 +367,9 @@ files:
|
|
298
367
|
- lib/bogus/stubbing/have_received_matcher.rb
|
299
368
|
- lib/bogus/stubbing/interaction.rb
|
300
369
|
- lib/bogus/stubbing/interaction_presenter.rb
|
370
|
+
- lib/bogus/stubbing/matchers/any_args.rb
|
371
|
+
- lib/bogus/stubbing/matchers/matches_argument.rb
|
372
|
+
- lib/bogus/stubbing/matchers/with_arguments.rb
|
301
373
|
- lib/bogus/stubbing/multi_stubber.rb
|
302
374
|
- lib/bogus/stubbing/not_all_expectations_satisfied.rb
|
303
375
|
- lib/bogus/stubbing/overwrites_methods.rb
|
@@ -308,6 +380,7 @@ files:
|
|
308
380
|
- lib/bogus/stubbing/tracks_existence_of_test_doubles.rb
|
309
381
|
- lib/bogus/stubbing/undefined_return_value.rb
|
310
382
|
- lib/bogus/stubbing/verifies_stub_definition.rb
|
383
|
+
- lib/bogus/support.rb
|
311
384
|
- lib/bogus/takes.rb
|
312
385
|
- lib/bogus/version.rb
|
313
386
|
- license.md
|
@@ -342,7 +415,9 @@ files:
|
|
342
415
|
- spec/bogus/fakes/overwrites_classes_spec.rb
|
343
416
|
- spec/bogus/fakes/registers_created_fakes_spec.rb
|
344
417
|
- spec/bogus/fakes/resets_overwritten_classes_spec.rb
|
418
|
+
- spec/bogus/fakes/stubbing_new_method_on_fake_class_spec.rb
|
345
419
|
- spec/bogus/mocking_dsl_spec.rb
|
420
|
+
- spec/bogus/ruby_2_1_support_spec.rb
|
346
421
|
- spec/bogus/ruby_2_support_spec.rb
|
347
422
|
- spec/bogus/stubbing/anything_spec.rb
|
348
423
|
- spec/bogus/stubbing/double_spec.rb
|
@@ -354,6 +429,7 @@ files:
|
|
354
429
|
- spec/bogus/stubbing/record_interactions_spec.rb
|
355
430
|
- spec/bogus/stubbing/resets_stubbed_methods_spec.rb
|
356
431
|
- spec/bogus/stubbing/shadow_spec.rb
|
432
|
+
- spec/bogus/stubbing/stubbing_existing_methods_on_fakes_spec.rb
|
357
433
|
- spec/bogus/stubbing/tracks_existence_of_test_doubles_spec.rb
|
358
434
|
- spec/bogus/stubbing/undefined_return_value_spec.rb
|
359
435
|
- spec/bogus/stubbing/verifies_stub_definition_spec.rb
|
@@ -361,105 +437,29 @@ files:
|
|
361
437
|
- spec/support/fake_creator_of_fakes.rb
|
362
438
|
- spec/support/matchers.rb
|
363
439
|
- spec/support/sample_fake.rb
|
440
|
+
- spec/support/shared_examples_for_keyword_arguments.rb
|
364
441
|
homepage: https://github.com/psyho/bogus
|
365
442
|
licenses:
|
366
443
|
- MIT
|
444
|
+
metadata: {}
|
367
445
|
post_install_message:
|
368
446
|
rdoc_options: []
|
369
447
|
require_paths:
|
370
448
|
- lib
|
371
449
|
required_ruby_version: !ruby/object:Gem::Requirement
|
372
|
-
none: false
|
373
450
|
requirements:
|
374
|
-
- -
|
451
|
+
- - ">="
|
375
452
|
- !ruby/object:Gem::Version
|
376
453
|
version: '0'
|
377
454
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
378
|
-
none: false
|
379
455
|
requirements:
|
380
|
-
- -
|
456
|
+
- - ">="
|
381
457
|
- !ruby/object:Gem::Version
|
382
458
|
version: '0'
|
383
459
|
requirements: []
|
384
460
|
rubyforge_project: bogus
|
385
|
-
rubygems_version:
|
461
|
+
rubygems_version: 2.2.2
|
386
462
|
signing_key:
|
387
|
-
specification_version:
|
463
|
+
specification_version: 4
|
388
464
|
summary: Create fakes to make your isolated unit tests reliable.
|
389
|
-
test_files:
|
390
|
-
- features/authors.md
|
391
|
-
- features/changelog.md
|
392
|
-
- features/configuration/fake_ar_attributes.feature
|
393
|
-
- features/configuration/readme.md
|
394
|
-
- features/configuration/search_modules.feature
|
395
|
-
- features/contract_tests/contract_tests_mocks.feature
|
396
|
-
- features/contract_tests/contract_tests_spies.feature
|
397
|
-
- features/contract_tests/contract_tests_stubs.feature
|
398
|
-
- features/contract_tests/custom_overwritten_class.feature
|
399
|
-
- features/contract_tests/readme.md
|
400
|
-
- features/contract_tests/return_value_contracts.feature
|
401
|
-
- features/fakes/anonymous_doubles.feature
|
402
|
-
- features/fakes/duck_types.feature
|
403
|
-
- features/fakes/fake_objects.feature
|
404
|
-
- features/fakes/global_fake_configuration.feature
|
405
|
-
- features/fakes/readme.md
|
406
|
-
- features/fakes/replacing_classes.feature
|
407
|
-
- features/getting_started.md
|
408
|
-
- features/license.md
|
409
|
-
- features/minitest_support.feature
|
410
|
-
- features/readme.md
|
411
|
-
- features/safe_stubbing/argument_matchers.feature
|
412
|
-
- features/safe_stubbing/readme.md
|
413
|
-
- features/safe_stubbing/safe_mocking.feature
|
414
|
-
- features/safe_stubbing/safe_stubbing.feature
|
415
|
-
- features/safe_stubbing/spies.feature
|
416
|
-
- features/step_definitions/rspec_steps.rb
|
417
|
-
- features/support/env.rb
|
418
|
-
- spec/bogus/clean_ruby_spec.rb
|
419
|
-
- spec/bogus/configuration_spec.rb
|
420
|
-
- spec/bogus/contracts/adds_contract_verification_spec.rb
|
421
|
-
- spec/bogus/contracts/adds_recording_spec.rb
|
422
|
-
- spec/bogus/contracts/interactions_repository_spec.rb
|
423
|
-
- spec/bogus/contracts/proxy_class_spec.rb
|
424
|
-
- spec/bogus/contracts/records_double_interactions_spec.rb
|
425
|
-
- spec/bogus/contracts/verifies_contracts_spec.rb
|
426
|
-
- spec/bogus/fakes/base_class_identifier_spec.rb
|
427
|
-
- spec/bogus/fakes/class_methods_spec.rb
|
428
|
-
- spec/bogus/fakes/converts_name_to_class_spec.rb
|
429
|
-
- spec/bogus/fakes/copies_classes_spec.rb
|
430
|
-
- spec/bogus/fakes/creates_fakes_spec.rb
|
431
|
-
- spec/bogus/fakes/creates_fakes_with_stubbed_methods_spec.rb
|
432
|
-
- spec/bogus/fakes/fake_ar_attributes_spec.rb
|
433
|
-
- spec/bogus/fakes/fake_configuration_spec.rb
|
434
|
-
- spec/bogus/fakes/fake_registry_spec.rb
|
435
|
-
- spec/bogus/fakes/fake_spec.rb
|
436
|
-
- spec/bogus/fakes/fakes_classes_spec.rb
|
437
|
-
- spec/bogus/fakes/faking_factories_spec.rb
|
438
|
-
- spec/bogus/fakes/frozen_fakes_spec.rb
|
439
|
-
- spec/bogus/fakes/instance_methods_spec.rb
|
440
|
-
- spec/bogus/fakes/makes_ducks_spec.rb
|
441
|
-
- spec/bogus/fakes/makes_substitute_methods_spec.rb
|
442
|
-
- spec/bogus/fakes/method_copiers_spec.rb
|
443
|
-
- spec/bogus/fakes/overwriten_classes_spec.rb
|
444
|
-
- spec/bogus/fakes/overwrites_classes_spec.rb
|
445
|
-
- spec/bogus/fakes/registers_created_fakes_spec.rb
|
446
|
-
- spec/bogus/fakes/resets_overwritten_classes_spec.rb
|
447
|
-
- spec/bogus/mocking_dsl_spec.rb
|
448
|
-
- spec/bogus/ruby_2_support_spec.rb
|
449
|
-
- spec/bogus/stubbing/anything_spec.rb
|
450
|
-
- spec/bogus/stubbing/double_spec.rb
|
451
|
-
- spec/bogus/stubbing/ensures_all_interactions_satisfied_spec.rb
|
452
|
-
- spec/bogus/stubbing/have_received_matcher_spec.rb
|
453
|
-
- spec/bogus/stubbing/interaction_spec.rb
|
454
|
-
- spec/bogus/stubbing/multi_stubber_spec.rb
|
455
|
-
- spec/bogus/stubbing/overwrites_methods_spec.rb
|
456
|
-
- spec/bogus/stubbing/record_interactions_spec.rb
|
457
|
-
- spec/bogus/stubbing/resets_stubbed_methods_spec.rb
|
458
|
-
- spec/bogus/stubbing/shadow_spec.rb
|
459
|
-
- spec/bogus/stubbing/tracks_existence_of_test_doubles_spec.rb
|
460
|
-
- spec/bogus/stubbing/undefined_return_value_spec.rb
|
461
|
-
- spec/bogus/stubbing/verifies_stub_definition_spec.rb
|
462
|
-
- spec/spec_helper.rb
|
463
|
-
- spec/support/fake_creator_of_fakes.rb
|
464
|
-
- spec/support/matchers.rb
|
465
|
-
- spec/support/sample_fake.rb
|
465
|
+
test_files: []
|