flexmock 1.0.0 → 1.0.1
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/Gemfile +4 -0
- data/Gemfile.lock +20 -0
- data/README.rdoc +3 -2
- data/Rakefile +1 -0
- data/TAGS +393 -297
- data/doc/releases/flexmock-1.0.0.rdoc +6 -6
- data/lib/flexmock/base.rb +4 -0
- data/lib/flexmock/class_extensions.rb +17 -0
- data/lib/flexmock/core.rb +4 -3
- data/lib/flexmock/object_extensions.rb +5 -0
- data/lib/flexmock/partial_mock.rb +2 -4
- data/lib/flexmock/symbol_extensions.rb +17 -0
- data/lib/flexmock/version.rb +1 -1
- data/test/assert_spy_called_test.rb +6 -6
- data/test/object_extensions_test.rb +25 -0
- data/test/partial_mock_test.rb +2 -2
- data/test/should_receive_test.rb +13 -0
- data/test/spys_test.rb +7 -7
- data/test/symbol_extensions_test.rb +8 -0
- data/test/test_class_extensions.rb +34 -0
- metadata +34 -31
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
diff-lcs (1.1.3)
|
5
|
+
rake (0.9.2.2)
|
6
|
+
rspec (2.11.0)
|
7
|
+
rspec-core (~> 2.11.0)
|
8
|
+
rspec-expectations (~> 2.11.0)
|
9
|
+
rspec-mocks (~> 2.11.0)
|
10
|
+
rspec-core (2.11.1)
|
11
|
+
rspec-expectations (2.11.2)
|
12
|
+
diff-lcs (~> 1.1.3)
|
13
|
+
rspec-mocks (2.11.2)
|
14
|
+
|
15
|
+
PLATFORMS
|
16
|
+
ruby
|
17
|
+
|
18
|
+
DEPENDENCIES
|
19
|
+
rake (>= 0.9.2.2)
|
20
|
+
rspec (>= 2.0)
|
data/README.rdoc
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
FlexMock is a simple, but flexible, mock object library for Ruby unit
|
4
4
|
testing.
|
5
5
|
|
6
|
-
Version :: 1.0.
|
6
|
+
Version :: 1.0.1
|
7
7
|
|
8
8
|
= Links
|
9
9
|
|
@@ -11,6 +11,7 @@ Version :: 1.0.0
|
|
11
11
|
<b>RubyGems</b> :: Install with: <b>gem install flexmock</b>
|
12
12
|
<b>Source</b> :: https://github.com/jimweirich/flexmock
|
13
13
|
<b>Bug Reports / Issue Tracking</b> :: https://github.com/jimweirich/flexmock/issues
|
14
|
+
<b>Continuous Integration</b> :: http://travis-ci.org/#!/jimweirich/flexmock
|
14
15
|
|
15
16
|
== Installation
|
16
17
|
|
@@ -704,7 +705,7 @@ objects will not be recorded.
|
|
704
705
|
|
705
706
|
You can get around this limitation by stubbing the method in question
|
706
707
|
on the normal mock, and then specifying <code>pass_thru</code>.
|
707
|
-
Assuming <code
|
708
|
+
Assuming <code>:bark</code> is a normal method on a Dog object, then
|
708
709
|
the following allows for spying on <code>:bark</code>.
|
709
710
|
|
710
711
|
dog = Dog.new
|
data/Rakefile
CHANGED
data/TAGS
CHANGED
@@ -1,12 +1,46 @@
|
|
1
1
|
|
2
|
-
(null),
|
2
|
+
(null),255
|
3
|
+
def known_good_way_to_build_xml(builder)known_good_way_to_build_xml160,4493
|
4
|
+
def new_way_to_build_xml(builder)new_way_to_build_xml164,4562
|
5
|
+
class QuoteServiceQuoteService235,6473
|
6
|
+
class PortfolioPortfolio238,6501
|
7
|
+
def valuevalue239,6519
|
8
|
+
|
9
|
+
doc/examples/test_unit_examples_test.rb,1490
|
10
|
+
class TestSimple < Test::Unit::TestCaseTestSimple3,30
|
11
|
+
def test_simple_mocktest_simple_mock7,108
|
12
|
+
class TestUndefined < Test::Unit::TestCaseTestUndefined15,244
|
13
|
+
def test_undefined_valuestest_undefined_values19,364
|
14
|
+
class TestDb < Test::Unit::TestCaseTestDb27,549
|
15
|
+
def test_dbtest_db36,862
|
16
|
+
class TestOrdered < Test::Unit::TestCaseTestOrdered48,1069
|
17
|
+
def test_query_and_updatetest_query_and_update55,1231
|
18
|
+
class MoreOrdered < Test::Unit::TestCaseMoreOrdered67,1457
|
19
|
+
def test_ordered_queriestest_ordered_queries81,2092
|
20
|
+
class EvenMoreOrderedTest < Test::Unit::TestCaseEvenMoreOrderedTest102,2633
|
21
|
+
def test_ordered_queries_in_record_modetest_ordered_queries_in_record_mode112,2998
|
22
|
+
class RecordedTest < Test::Unit::TestCaseRecordedTest132,3462
|
23
|
+
def test_build_xmltest_build_xml148,4182
|
24
|
+
def known_good_way_to_build_xml(builder)known_good_way_to_build_xml157,4437
|
25
|
+
def new_way_to_build_xml(builder)new_way_to_build_xml161,4506
|
26
|
+
class MultipleReturnValueTest < Test::Unit::TestCaseMultipleReturnValueTest167,4573
|
27
|
+
def test_multiple_getstest_multiple_gets175,4844
|
28
|
+
class IgnoreUnimportantMessages < Test::Unit::TestCaseIgnoreUnimportantMessages187,5119
|
29
|
+
def test_an_important_messagetest_an_important_message196,5444
|
30
|
+
class PartialMockTest < Test::Unit::TestCasePartialMockTest213,5869
|
31
|
+
def test_portfolio_valuetest_portfolio_value222,6185
|
32
|
+
class QuoteServiceQuoteService231,6439
|
33
|
+
class PortfolioPortfolio234,6467
|
34
|
+
def valuevalue235,6485
|
35
|
+
|
36
|
+
/Users/jim/working/git/flexmock/doc/jamis.rb,43
|
3
37
|
module RDocRDoc1,0
|
4
38
|
module PagePage2,12
|
5
39
|
|
6
40
|
install.rb,29
|
7
41
|
def indir(newdir)indir7,68
|
8
42
|
|
9
|
-
|
43
|
+
,880
|
10
44
|
class FlexMockFlexMock14,320
|
11
45
|
class AnyMatcherAnyMatcher17,427
|
12
46
|
def ===(target)===18,446
|
@@ -27,15 +61,19 @@ class FlexMockFlexMock14,320
|
|
27
61
|
def initialize(methods)initialize73,1627
|
28
62
|
def ===(target)===76,1688
|
29
63
|
def inspectinspect79,1766
|
64
|
+
class OptionalProcMatcherOptionalProcMatcher86,1990
|
65
|
+
def initializeinitialize87,2018
|
66
|
+
def ===(target)===89,2045
|
67
|
+
def inspectinspect92,2132
|
30
68
|
|
31
|
-
lib/flexmock/argument_matching.rb,
|
69
|
+
lib/flexmock/argument_matching.rb,224
|
32
70
|
class FlexMockFlexMock1,0
|
33
71
|
module ArgumentMatchingArgumentMatching2,15
|
34
|
-
def all_match?(expected_args, actual_args)all_match?
|
35
|
-
def match?(expected, actual)match?
|
36
|
-
def
|
72
|
+
def all_match?(expected_args, actual_args)all_match?7,92
|
73
|
+
def match?(expected, actual)match?23,595
|
74
|
+
def missing?(arg)missing?29,752
|
37
75
|
|
38
|
-
,
|
76
|
+
,272
|
39
77
|
class FlexMockFlexMock14,332
|
40
78
|
module ArgumentTypesArgumentTypes21,625
|
41
79
|
def anyany23,708
|
@@ -43,34 +81,42 @@ class FlexMockFlexMock14,332
|
|
43
81
|
def on(&block)on36,1035
|
44
82
|
def hsh(hash)hsh42,1176
|
45
83
|
def ducktype(*methods)ducktype48,1353
|
84
|
+
def optional_procoptional_proc52,1420
|
46
85
|
|
47
86
|
lib/flexmock/base.rb,0
|
48
87
|
|
88
|
+
lib/flexmock/class_extension.rb,137
|
89
|
+
class ClassClass10,415
|
90
|
+
def flexmock_defines?(sym)flexmock_defines?15,526
|
91
|
+
def flexmock_defines?(sym)flexmock_defines?21,685
|
92
|
+
|
49
93
|
lib/flexmock/composite.rb,30
|
50
94
|
class FlexMockFlexMock8,133
|
51
95
|
|
52
|
-
lib/flexmock/core.rb,
|
53
|
-
class FlexMockFlexMock
|
54
|
-
def initialize(name="unknown", container=nil)initialize
|
55
|
-
def inspectinspect
|
56
|
-
def flexmock_verifyflexmock_verify
|
57
|
-
def flexmock_teardownflexmock_teardown
|
58
|
-
def should_ignore_missingshould_ignore_missing
|
59
|
-
def by_defaultby_default
|
60
|
-
def method_missing(sym, *args, &block)method_missing
|
61
|
-
def respond_to?(sym, *args)respond_to?
|
62
|
-
def flexmock_find_expectation(method_name, *args) # :nodoc:flexmock_find_expectation
|
63
|
-
def flexmock_expectations_for(method_name) # :nodoc:flexmock_expectations_for
|
64
|
-
def
|
65
|
-
def
|
66
|
-
def
|
67
|
-
def
|
68
|
-
def
|
69
|
-
def
|
70
|
-
def
|
71
|
-
def
|
72
|
-
|
73
|
-
,
|
96
|
+
lib/flexmock/core.rb,1161
|
97
|
+
class FlexMockFlexMock49,1378
|
98
|
+
def initialize(name="unknown", container=nil)initialize58,1648
|
99
|
+
def inspectinspect70,1980
|
100
|
+
def flexmock_verifyflexmock_verify76,2140
|
101
|
+
def flexmock_teardownflexmock_teardown87,2381
|
102
|
+
def should_ignore_missingshould_ignore_missing91,2461
|
103
|
+
def by_defaultby_default97,2582
|
104
|
+
def method_missing(sym, *args, &block)method_missing103,2711
|
105
|
+
def respond_to?(sym, *args)respond_to?123,3330
|
106
|
+
def flexmock_find_expectation(method_name, *args) # :nodoc:flexmock_find_expectation128,3486
|
107
|
+
def flexmock_expectations_for(method_name) # :nodoc:flexmock_expectations_for134,3691
|
108
|
+
def flexmock_based_on(base_class)flexmock_based_on138,3784
|
109
|
+
def flexmock_received?(sym, args, options={})flexmock_received?144,3959
|
110
|
+
def flexmock_callsflexmock_calls159,4363
|
111
|
+
def flexmock_invoke_original(sym, args)flexmock_invoke_original165,4478
|
112
|
+
def method(sym)method170,4623
|
113
|
+
def should_receive(*args)should_receive199,5662
|
114
|
+
def should_expectshould_expect223,6506
|
115
|
+
def flexmock_wrap(&block)flexmock_wrap231,6696
|
116
|
+
def override_existing_method(sym)override_existing_method245,7251
|
117
|
+
def sclasssclass254,7471
|
118
|
+
|
119
|
+
zwv8g_296jq17rcjpjw_94jc0000gn/T//tags.O8BSYh,289
|
74
120
|
class FlexMockFlexMock15,353
|
75
121
|
def use(*names)use39,1294
|
76
122
|
def format_args(sym, args) # :nodoc:format_args53,1691
|
@@ -101,7 +147,7 @@ class FlexMockFlexMock14,320
|
|
101
147
|
class UsageError < ::RuntimeErrorUsageError17,388
|
102
148
|
class MockError < ::RuntimeErrorMockError20,431
|
103
149
|
|
104
|
-
lib/flexmock/expectation.rb,
|
150
|
+
lib/flexmock/expectation.rb,2083
|
105
151
|
class FlexMockFlexMock15,356
|
106
152
|
class ExpectationExpectation29,889
|
107
153
|
def initialize(mock, sym)initialize35,1035
|
@@ -123,29 +169,31 @@ class FlexMockFlexMock15,356
|
|
123
169
|
def and_yield(*yield_values)and_yield218,6398
|
124
170
|
def and_raise(exception, *args)and_raise242,7151
|
125
171
|
def and_throw(sym, value=nil)and_throw256,7516
|
126
|
-
def
|
127
|
-
def
|
128
|
-
def
|
129
|
-
def
|
130
|
-
def
|
131
|
-
def
|
132
|
-
def
|
133
|
-
def
|
134
|
-
def
|
135
|
-
def
|
136
|
-
def
|
137
|
-
|
138
|
-
def
|
139
|
-
|
140
|
-
def
|
141
|
-
def
|
142
|
-
def
|
143
|
-
def
|
144
|
-
def
|
145
|
-
|
146
|
-
def
|
147
|
-
|
148
|
-
def
|
172
|
+
def pass_thrupass_thru261,7626
|
173
|
+
def zero_or_more_timeszero_or_more_times268,7804
|
174
|
+
def times(limit)times275,8027
|
175
|
+
def nevernever284,8374
|
176
|
+
def onceonce291,8589
|
177
|
+
def twicetwice298,8804
|
178
|
+
def at_leastat_least310,9130
|
179
|
+
def at_mostat_most323,9509
|
180
|
+
def ordered(group_name=nil)ordered352,10778
|
181
|
+
def globallyglobally364,11158
|
182
|
+
def define_ordered(group_name, ordering)define_ordered370,11273
|
183
|
+
def explicitlyexplicitly386,11854
|
184
|
+
def by_defaultby_default390,11893
|
185
|
+
class CompositeExpectationCompositeExpectation401,12300
|
186
|
+
def initializeinitialize404,12374
|
187
|
+
def add(expectation)add409,12470
|
188
|
+
def method_missing(sym, *args, &block)method_missing414,12611
|
189
|
+
def order_numberorder_number425,12986
|
190
|
+
def mockmock430,13096
|
191
|
+
def should_receive(*args, &block)should_receive436,13260
|
192
|
+
def to_sto_s441,13406
|
193
|
+
class ExpectationRecorderExpectationRecorder455,13864
|
194
|
+
def initializeinitialize458,13924
|
195
|
+
def method_missing(sym, *args, &block)method_missing463,14035
|
196
|
+
def apply(mock)apply471,14307
|
149
197
|
|
150
198
|
,483
|
151
199
|
class FlexMockFlexMock15,345
|
@@ -158,7 +206,15 @@ class FlexMockFlexMock15,345
|
|
158
206
|
def defaultify_expectation(exp) # :nodoc:defaultify_expectation69,2150
|
159
207
|
def find_expectation_in(expectations, *args)find_expectation_in81,2431
|
160
208
|
|
161
|
-
|
209
|
+
����,285
|
210
|
+
class FlexMockFlexMock2,1
|
211
|
+
class ExplicitNeededExplicitNeeded11,389
|
212
|
+
def initialize(expectation, method_name, base_class)initialize12,412
|
213
|
+
def explicitlyexplicitly19,599
|
214
|
+
def explicit?explicit?24,661
|
215
|
+
def method_missing(sym, *args, &block)method_missing28,704
|
216
|
+
|
217
|
+
lib/flexmock/mock_container.rb,1013
|
162
218
|
class FlexMockFlexMock16,381
|
163
219
|
module MockContainerMockContainer26,782
|
164
220
|
def flexmock_teardownflexmock_teardown31,966
|
@@ -166,16 +222,16 @@ class FlexMockFlexMock16,381
|
|
166
222
|
def flexmock_created_mocksflexmock_created_mocks45,1302
|
167
223
|
def flexmock_closeflexmock_close51,1522
|
168
224
|
def flexmock(*args)flexmock119,4730
|
169
|
-
def flexmock_remember(mocking_object)flexmock_remember
|
170
|
-
def flexmock_test_has_failed?flexmock_test_has_failed?
|
171
|
-
class MockContainerHelperMockContainerHelper
|
172
|
-
def next_idnext_id
|
173
|
-
def parse_should_args(mock, args, &block) # :nodoc:parse_should_args
|
174
|
-
def add_model_methods(mock, model_class, id)add_model_methods
|
175
|
-
def make_partial_proxy(container, obj, name, safe_mode)make_partial_proxy
|
176
|
-
def build_demeter_chain(mock, arg, &block)build_demeter_chain
|
177
|
-
def check_proper_mock(mock, method_name)check_proper_mock
|
178
|
-
def check_method_names(names)check_method_names
|
225
|
+
def flexmock_remember(mocking_object)flexmock_remember172,6289
|
226
|
+
def flexmock_test_has_failed?flexmock_test_has_failed?185,6760
|
227
|
+
class MockContainerHelperMockContainerHelper198,7272
|
228
|
+
def next_idnext_id202,7381
|
229
|
+
def parse_should_args(mock, args, &block) # :nodoc:parse_should_args215,7854
|
230
|
+
def add_model_methods(mock, model_class, id)add_model_methods233,8367
|
231
|
+
def make_partial_proxy(container, obj, name, safe_mode)make_partial_proxy262,9585
|
232
|
+
def build_demeter_chain(mock, arg, &block)build_demeter_chain308,11571
|
233
|
+
def check_proper_mock(mock, method_name)check_proper_mock333,12418
|
234
|
+
def check_method_names(names)check_method_names343,12827
|
179
235
|
|
180
236
|
lib/flexmock/noop.rb,0
|
181
237
|
|
@@ -188,34 +244,37 @@ class FlexMockFlexMock12,294
|
|
188
244
|
def flexmock_current_order=(value)flexmock_current_order=39,1127
|
189
245
|
def flexmock_validate_order(method_name, order_number)flexmock_validate_order43,1213
|
190
246
|
|
191
|
-
lib/flexmock/partial_mock.rb,
|
247
|
+
lib/flexmock/partial_mock.rb,1723
|
192
248
|
class FlexMockFlexMock14,319
|
193
249
|
class PartialMockProxyPartialMockProxy26,949
|
194
|
-
def initialize(obj, mock, safe_mode)initialize41,
|
195
|
-
def flexmock_getflexmock_get57,
|
196
|
-
def should_receive(*args)should_receive81,
|
197
|
-
def add_mock_method(method_name)add_mock_method92,
|
198
|
-
def new_instances(*allocators, &block)new_instances124,
|
199
|
-
def invoke_original(method, args)invoke_original146,
|
200
|
-
def
|
201
|
-
def
|
202
|
-
def
|
203
|
-
def
|
204
|
-
def
|
205
|
-
def
|
206
|
-
def
|
207
|
-
def
|
208
|
-
def
|
209
|
-
def
|
210
|
-
def
|
211
|
-
def
|
212
|
-
def
|
213
|
-
def
|
214
|
-
def
|
215
|
-
def
|
216
|
-
def
|
217
|
-
|
218
|
-
|
250
|
+
def initialize(obj, mock, safe_mode)initialize41,1331
|
251
|
+
def flexmock_getflexmock_get57,1731
|
252
|
+
def should_receive(*args)should_receive81,2671
|
253
|
+
def add_mock_method(method_name)add_mock_method92,2949
|
254
|
+
def new_instances(*allocators, &block)new_instances124,4165
|
255
|
+
def invoke_original(method, args)invoke_original146,5013
|
256
|
+
def flexmock_invoke_original(method, args)flexmock_invoke_original152,5167
|
257
|
+
def flexmock_verifyflexmock_verify158,5399
|
258
|
+
def flexmock_teardownflexmock_teardown163,5535
|
259
|
+
def flexmock_containerflexmock_container175,5873
|
260
|
+
def flexmock_received?(*args)flexmock_received?180,5966
|
261
|
+
def flexmock_callsflexmock_calls185,6073
|
262
|
+
def flexmock_container=(container)flexmock_container=191,6260
|
263
|
+
def flexmock_expectations_for(method_name)flexmock_expectations_for195,6376
|
264
|
+
def check_allocate_method(allocate_method)check_allocate_method201,6496
|
265
|
+
def sclasssclass208,6759
|
266
|
+
def singleton?(method_name)singleton?214,6900
|
267
|
+
def hide_existing_method(method_name)hide_existing_method224,7365
|
268
|
+
def stow_existing_definition(method_name)stow_existing_definition231,7582
|
269
|
+
def create_alias_for_existing_method(method_name)create_alias_for_existing_method251,8299
|
270
|
+
def safe_alias_method(new_alias, method_name)safe_alias_method263,8741
|
271
|
+
def define_proxy_method(method_name)define_proxy_method276,9102
|
272
|
+
def restore_original_definition(method_name)restore_original_definition297,9860
|
273
|
+
def remove_current_method(method_name)remove_current_method314,10331
|
274
|
+
def detached?detached?319,10492
|
275
|
+
def new_name(old_name)new_name324,10600
|
276
|
+
|
277
|
+
,665
|
219
278
|
class FlexMockFlexMock3,20
|
220
279
|
module MockContainerMockContainer4,35
|
221
280
|
def rails_versionrails_version6,59
|
@@ -226,7 +285,7 @@ class FlexMockFlexMock3,20
|
|
226
285
|
def should_render_view_22x(template_name)should_render_view_22x109,3813
|
227
286
|
def should_render_view_23x(template_name)should_render_view_23x129,4575
|
228
287
|
|
229
|
-
|
288
|
+
,0
|
230
289
|
|
231
290
|
lib/flexmock/recorder.rb,271
|
232
291
|
class FlexMockFlexMock14,329
|
@@ -244,32 +303,32 @@ class FlexMockFlexMock16,321
|
|
244
303
|
class AssertionFailedError < StandardError; endAssertionFailedError33,713
|
245
304
|
def assertion_failed_errorassertion_failed_error34,765
|
246
305
|
|
247
|
-
|
306
|
+
,657
|
248
307
|
class FlexMockFlexMock3,35
|
249
308
|
module RSpecMatchersRSpecMatchers4,50
|
250
309
|
class HaveReceivedHaveReceived6,74
|
251
310
|
def initialize(method_name)initialize9,126
|
252
311
|
def matches?(spy)matches?17,295
|
253
|
-
def failure_message_for_shouldfailure_message_for_should25,
|
254
|
-
def failure_message_for_should_notfailure_message_for_should_not29,
|
255
|
-
def with(*args)with33,
|
256
|
-
def with_a_blockwith_a_block38,
|
257
|
-
def without_a_blockwithout_a_block43,
|
258
|
-
def times(n)times48,
|
259
|
-
def nevernever53,
|
260
|
-
def onceonce57,
|
261
|
-
def twicetwice61,
|
262
|
-
def have_received(method_name)have_received66,
|
263
|
-
|
264
|
-
|
312
|
+
def failure_message_for_shouldfailure_message_for_should25,548
|
313
|
+
def failure_message_for_should_notfailure_message_for_should_not29,666
|
314
|
+
def with(*args)with33,797
|
315
|
+
def with_a_blockwith_a_block38,864
|
316
|
+
def without_a_blockwithout_a_block43,939
|
317
|
+
def times(n)times48,1018
|
318
|
+
def nevernever53,1080
|
319
|
+
def onceonce57,1124
|
320
|
+
def twicetwice61,1167
|
321
|
+
def have_received(method_name)have_received66,1219
|
322
|
+
|
323
|
+
,542
|
265
324
|
class FlexMockFlexMock1,0
|
266
325
|
module SpyDescribersSpyDescribers3,16
|
267
326
|
def describe_spy_expectation(spy, sym, args, options={})describe_spy_expectation4,41
|
268
327
|
def describe_spy_negative_expectation(spy, sym, args, options={})describe_spy_negative_expectation8,157
|
269
328
|
def describe(spy, sym, args, options, not_clause="")describe14,305
|
270
|
-
def times_description(times)times_description
|
271
|
-
def block_description(needs_block)block_description
|
272
|
-
def call_description(sym, args)call_description
|
329
|
+
def times_description(times)times_description29,893
|
330
|
+
def block_description(needs_block)block_description44,1142
|
331
|
+
def call_description(sym, args)call_description55,1349
|
273
332
|
|
274
333
|
lib/flexmock/test_unit.rb,120
|
275
334
|
module TestTest14,336
|
@@ -291,7 +350,7 @@ class FlexMockFlexMock16,386
|
|
291
350
|
class TestUnitFrameworkAdapterTestUnitFrameworkAdapter47,1356
|
292
351
|
def assertion_failed_errorassertion_failed_error49,1424
|
293
352
|
|
294
|
-
|
353
|
+
,318
|
295
354
|
class FlexMockFlexMock12,294
|
296
355
|
class UndefinedUndefined17,465
|
297
356
|
def method_missing(sym, *args, &block)method_missing18,483
|
@@ -319,9 +378,9 @@ lib/flexmock/version.rb,58
|
|
319
378
|
class FlexMockFlexMock1,0
|
320
379
|
module VersionVersion2,15
|
321
380
|
|
322
|
-
|
381
|
+
/usr/local/bin/exuberant_ctags,0
|
323
382
|
|
324
|
-
|
383
|
+
,521
|
325
384
|
class FlexMockFlexMock5,48
|
326
385
|
module StubsAndExpectsStubsAndExpects6,63
|
327
386
|
def expects(*args)expects7,88
|
@@ -345,12 +404,25 @@ class AssertSpyCalledTest < Test::Unit::TestCaseAssertSpyCalledTest6,95
|
|
345
404
|
def test_assert_detects_basic_calltest_assert_detects_basic_call25,324
|
346
405
|
def test_assert_detects_basic_call_with_argstest_assert_detects_basic_call_with_args30,412
|
347
406
|
def test_assert_rejects_incorrect_argstest_assert_rejects_incorrect_args35,521
|
348
|
-
def test_assert_detects_multiple_callstest_assert_detects_multiple_calls42,
|
349
|
-
def test_assert_rejects_incorrect_typetest_assert_rejects_incorrect_type49,
|
350
|
-
def test_assert_detects_blockstest_assert_detects_blocks57,
|
351
|
-
def test_assert_detects_any_argstest_assert_detects_any_args64,
|
352
|
-
def test_assert_rejects_bad_count_on_any_argstest_assert_rejects_bad_count_on_any_args72,
|
353
|
-
def assert_fails(message_pattern)assert_fails81,
|
407
|
+
def test_assert_detects_multiple_callstest_assert_detects_multiple_calls42,742
|
408
|
+
def test_assert_rejects_incorrect_typetest_assert_rejects_incorrect_type49,873
|
409
|
+
def test_assert_detects_blockstest_assert_detects_blocks57,1114
|
410
|
+
def test_assert_detects_any_argstest_assert_detects_any_args64,1252
|
411
|
+
def test_assert_rejects_bad_count_on_any_argstest_assert_rejects_bad_count_on_any_args72,1442
|
412
|
+
def assert_fails(message_pattern)assert_fails81,1697
|
413
|
+
|
414
|
+
test/base_class_test.rb,707
|
415
|
+
class BaseClassTest < Test::Unit::TestCaseBaseClassTest3,27
|
416
|
+
class FooBarFooBar6,100
|
417
|
+
def foofoo7,115
|
418
|
+
def method_missing(sym, *args, &block)method_missing10,136
|
419
|
+
def respond_to?(method)respond_to?15,235
|
420
|
+
def mockmock20,309
|
421
|
+
def test_auto_mocks_classtest_auto_mocks_class24,363
|
422
|
+
def test_can_stub_existing_methodstest_can_stub_existing_methods28,434
|
423
|
+
def test_can_not_stub_non_class_defined_methodstest_can_not_stub_non_class_defined_methods33,548
|
424
|
+
def test_can_explicitly_stub_non_class_defined_methodstest_can_explicitly_stub_non_class_defined_methods42,856
|
425
|
+
def test_can_explicitly_stub_meta_programmed_methodstest_can_explicitly_stub_meta_programmed_methods47,1010
|
354
426
|
|
355
427
|
test/container_methods_test.rb,1111
|
356
428
|
class TestFlexmockContainerMethods < Test::Unit::TestCaseTestFlexmockContainerMethods15,379
|
@@ -429,7 +501,8 @@ class TestAnyInstance < Test::Unit::TestCaseTestAnyInstance205,4854
|
|
429
501
|
def barkbark210,4975
|
430
502
|
def test_any_instance_still_works_for_backwards_compatibilitytest_any_instance_still_works_for_backwards_compatibility215,5015
|
431
503
|
|
432
|
-
|
504
|
+
|
505
|
+
���,1206
|
433
506
|
class TemperatureSamplerTemperatureSampler14,321
|
434
507
|
def initialize(sensor)initialize15,346
|
435
508
|
def average_tempaverage_temp19,399
|
@@ -519,7 +592,7 @@ class TestNewInstances < Test::Unit::TestCaseTestNewInstances14,321
|
|
519
592
|
def test_ordering_can_be_specifiedtest_ordering_can_be_specified198,5234
|
520
593
|
def test_ordering_can_be_specified_in_groupstest_ordering_can_be_specified_in_groups206,5428
|
521
594
|
|
522
|
-
test/partial_mock_test.rb,
|
595
|
+
test/partial_mock_test.rb,5827
|
523
596
|
class TestStubbing < Test::Unit::TestCaseTestStubbing14,321
|
524
597
|
class DogDog17,393
|
525
598
|
def barkbark18,405
|
@@ -528,52 +601,62 @@ class TestStubbing < Test::Unit::TestCaseTestStubbing14,321
|
|
528
601
|
def should_receiveshould_receive27,509
|
529
602
|
def new_instancesnew_instances30,558
|
530
603
|
def by_defaultby_default33,603
|
531
|
-
def
|
532
|
-
def
|
533
|
-
def
|
534
|
-
def
|
535
|
-
def
|
536
|
-
def
|
537
|
-
def
|
538
|
-
def
|
539
|
-
def
|
540
|
-
def
|
541
|
-
def
|
542
|
-
|
543
|
-
def
|
544
|
-
def obj.hi(
|
545
|
-
def
|
546
|
-
|
547
|
-
def
|
548
|
-
|
549
|
-
def
|
550
|
-
|
551
|
-
def
|
552
|
-
def
|
553
|
-
def
|
554
|
-
def
|
555
|
-
def
|
556
|
-
def
|
557
|
-
def
|
558
|
-
def
|
559
|
-
def
|
560
|
-
|
561
|
-
class
|
562
|
-
def
|
563
|
-
def
|
564
|
-
|
565
|
-
def
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
def
|
572
|
-
def
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
604
|
+
def test_attempting_to_partially_mock_existing_mock_is_nooptest_attempting_to_partially_mock_existing_mock_is_noop38,659
|
605
|
+
def test_stub_command_add_behavior_to_arbitrary_objectstest_stub_command_add_behavior_to_arbitrary_objects44,827
|
606
|
+
def test_stub_command_can_configure_via_blocktest_stub_command_can_configure_via_block50,1011
|
607
|
+
def test_stubbed_methods_can_take_blockstest_stubbed_methods_can_take_blocks58,1208
|
608
|
+
def test_multiple_stubs_on_the_same_object_reuse_the_same_partial_mocktest_multiple_stubs_on_the_same_object_reuse_the_same_partial_mock65,1433
|
609
|
+
def test_stubbed_methods_can_invoke_original_behaviortest_stubbed_methods_can_invoke_original_behavior70,1580
|
610
|
+
def test_multiple_methods_can_be_stubbedtest_multiple_methods_can_be_stubbed76,1749
|
611
|
+
def test_original_behavior_can_be_restoredtest_original_behavior_can_be_restored84,2001
|
612
|
+
def test_original_missing_behavior_can_be_restoredtest_original_missing_behavior_can_be_restored94,2336
|
613
|
+
def test_multiple_stubs_on_single_method_can_be_restored_missing_methodtest_multiple_stubs_on_single_method_can_be_restored_missing_method103,2615
|
614
|
+
def test_original_behavior_is_restored_when_multiple_methods_are_mockedtest_original_behavior_is_restored_when_multiple_methods_are_mocked114,3024
|
615
|
+
def test_original_behavior_is_restored_on_class_objectstest_original_behavior_is_restored_on_class_objects123,3353
|
616
|
+
def test_original_behavior_is_restored_on_singleton_methodstest_original_behavior_is_restored_on_singleton_methods130,3600
|
617
|
+
def obj.hi() :hello endhi132,3683
|
618
|
+
def test_original_behavior_is_restored_on_singleton_methods_with_multiple_stubstest_original_behavior_is_restored_on_singleton_methods_with_multiple_stubs140,3879
|
619
|
+
def obj.hi(n) "hello#{n}" endhi142,3982
|
620
|
+
def test_original_behavior_is_restored_on_nonsingleton_methods_with_multiple_stubstest_original_behavior_is_restored_on_nonsingleton_methods_with_multiple_stubs152,4303
|
621
|
+
def test_stubbing_file_shouldnt_break_writingtest_stubbing_file_shouldnt_break_writing168,4797
|
622
|
+
def test_original_behavior_is_restored_even_when_errorstest_original_behavior_is_restored_even_when_errors184,5236
|
623
|
+
def m.flexmock_verify() endflexmock_verify196,5613
|
624
|
+
def test_not_calling_stubbed_method_is_an_errortest_not_calling_stubbed_method_is_an_error199,5652
|
625
|
+
def test_mock_is_verified_when_the_stub_is_verifiedtest_mock_is_verified_when_the_stub_is_verified208,5870
|
626
|
+
def test_stub_can_have_explicit_nametest_stub_can_have_explicit_name217,6127
|
627
|
+
def test_unamed_stub_will_use_default_naming_conventiontest_unamed_stub_will_use_default_naming_convention223,6306
|
628
|
+
def test_partials_can_be_defined_in_a_blocktest_partials_can_be_defined_in_a_block229,6502
|
629
|
+
def test_partials_defining_block_return_real_obj_not_proxytest_partials_defining_block_return_real_obj_not_proxy237,6689
|
630
|
+
def test_partial_mocks_always_return_domain_objecttest_partial_mocks_always_return_domain_object244,6883
|
631
|
+
def test_domain_objects_do_not_have_mock_methodstest_domain_objects_do_not_have_mock_methods255,7163
|
632
|
+
def test_partial_mocks_have_mock_methodstest_partial_mocks_have_mock_methods262,7355
|
633
|
+
def test_partial_mocks_do_not_have_mock_methods_after_teardowntest_partial_mocks_do_not_have_mock_methods_after_teardown270,7551
|
634
|
+
class NoMethodsNoMethods284,8143
|
635
|
+
def methods(arg = true)methods285,8161
|
636
|
+
def test_object_methods_method_is_not_used_in_singleton_checkstest_object_methods_method_is_not_used_in_singleton_checks290,8261
|
637
|
+
def obj.mock() :original endmock292,8350
|
638
|
+
def test_partial_mocks_with_mock_method_singleton_colision_have_original_defs_restoredtest_partial_mocks_with_mock_method_singleton_colision_have_original_defs_restored296,8435
|
639
|
+
def dog.mock() :original endmock298,8542
|
640
|
+
class MockColisionMockColision304,8663
|
641
|
+
def mockmock305,8684
|
642
|
+
def test_partial_mocks_with_mock_method_non_singleton_colision_have_original_defs_restoredtest_partial_mocks_with_mock_method_non_singleton_colision_have_original_defs_restored310,8728
|
643
|
+
def test_safe_partial_mocks_do_not_support_mock_methodstest_safe_partial_mocks_do_not_support_mock_methods317,8932
|
644
|
+
def test_safe_partial_mocks_require_blocktest_safe_partial_mocks_require_block325,9160
|
645
|
+
def test_safe_partial_mocks_are_actually_mockedtest_safe_partial_mocks_are_actually_mocked330,9293
|
646
|
+
def test_should_receive_does_not_override_preexisting_deftest_should_receive_does_not_override_preexisting_def335,9463
|
647
|
+
def test_should_receive_does_override_should_receive_preexisting_deftest_should_receive_does_override_should_receive_preexisting_def341,9663
|
648
|
+
class LiarLiar346,9847
|
649
|
+
def respond_to?(method_name)respond_to?347,9860
|
650
|
+
def test_liar_actually_liestest_liar_actually_lies357,10029
|
651
|
+
def test_partial_mock_where_respond_to_is_true_yet_method_is_not_theretest_partial_mock_where_respond_to_is_true_yet_method_is_not_there363,10181
|
652
|
+
class MetaDog < DogMetaDog369,10366
|
653
|
+
def method_missing(method, *args, &block)method_missing370,10388
|
654
|
+
def respond_to_missing?(method, *)respond_to_missing?377,10522
|
655
|
+
def test_partial_mock_where_method_created_by_method_missing_and_respond_to_missingtest_partial_mock_where_method_created_by_method_missing_and_respond_to_missing382,10608
|
656
|
+
class ValueObjectValueObject393,11034
|
657
|
+
def initialize(val)initialize396,11076
|
658
|
+
def ==(other)==400,11126
|
659
|
+
def test_partial_mocks_in_the_presense_of_equal_definitiontest_partial_mocks_in_the_presense_of_equal_definition405,11183
|
577
660
|
|
578
661
|
test/rails_view_stub_test.rb,1492
|
579
662
|
module ViewTestsViewTests6,86
|
@@ -621,13 +704,13 @@ class FlexMockFlexMock3,20
|
|
621
704
|
module RedirectErrorRedirectError4,35
|
622
705
|
def redirect_errorredirect_error5,58
|
623
706
|
|
624
|
-
,0
|
707
|
+
/var/folders/b9/zwv8g_296jq17rcjpjw_94jc0000gn/T//tags.oohD92,0
|
625
708
|
|
626
709
|
test/rspec_integration/spy_example_spec.rb,134
|
627
710
|
class DogDog8,106
|
628
711
|
def wags(arg)wags9,118
|
629
712
|
def barksbarks13,179
|
630
|
-
def should_fail(message_pattern)should_fail134,
|
713
|
+
def should_fail(message_pattern)should_fail134,3188
|
631
714
|
|
632
715
|
,2164
|
633
716
|
class TestSamples < Test::Unit::TestCaseTestSamples16,347
|
@@ -674,7 +757,7 @@ class TestMoreSamples < Test::Unit::TestCaseTestMoreSamples242,5754
|
|
674
757
|
def valuevalue270,6448
|
675
758
|
def test_portfolio_valuetest_portfolio_value275,6504
|
676
759
|
|
677
|
-
|
760
|
+
���,1266
|
678
761
|
class TestShouldIgnoreMissing < Test::Unit::TestCaseTestShouldIgnoreMissing14,321
|
679
762
|
def setupsetup17,404
|
680
763
|
def test_mocks_do_not_respond_to_undefined_methodstest_mocks_do_not_respond_to_undefined_methods21,452
|
@@ -689,7 +772,7 @@ class TestShouldIgnoreMissing < Test::Unit::TestCaseTestShouldIgnoreMissing14,
|
|
689
772
|
def test_not_calling_method_proc_will_fail_count_constraintstest_not_calling_method_proc_will_fail_count_constraints69,1762
|
690
773
|
def test_method_returns_do_nothing_proc_for_missing_methodstest_method_returns_do_nothing_proc_for_missing_methods78,2024
|
691
774
|
|
692
|
-
,
|
775
|
+
,11559
|
693
776
|
def mock_top_level_functionmock_top_level_function14,321
|
694
777
|
module KernelKernel18,362
|
695
778
|
def mock_kernel_functionmock_kernel_function19,376
|
@@ -709,134 +792,142 @@ class TestFlexMockShoulds < Test::Unit::TestCaseTestFlexMockShoulds32,491
|
|
709
792
|
def test_and_yield_will_continue_to_yield_the_same_valuetest_and_yield_will_continue_to_yield_the_same_value128,3116
|
710
793
|
def test_and_yield_with_multiple_values_yields_the_valuestest_and_yield_with_multiple_values_yields_the_values136,3362
|
711
794
|
def test_multiple_yields_are_done_sequentiallytest_multiple_yields_are_done_sequentially143,3572
|
712
|
-
def
|
713
|
-
def
|
714
|
-
def
|
715
|
-
def
|
716
|
-
def
|
717
|
-
def
|
718
|
-
|
719
|
-
|
720
|
-
def
|
721
|
-
def
|
722
|
-
def
|
723
|
-
def
|
724
|
-
def
|
725
|
-
def
|
726
|
-
def
|
727
|
-
def
|
728
|
-
def
|
729
|
-
def
|
730
|
-
def
|
731
|
-
def
|
732
|
-
def
|
733
|
-
def
|
734
|
-
def
|
735
|
-
def
|
736
|
-
def
|
737
|
-
def
|
738
|
-
def
|
739
|
-
def
|
740
|
-
def
|
741
|
-
def
|
742
|
-
def
|
743
|
-
def
|
744
|
-
def
|
745
|
-
def
|
746
|
-
def
|
747
|
-
def
|
748
|
-
def
|
749
|
-
def
|
750
|
-
def
|
751
|
-
def
|
752
|
-
def
|
753
|
-
def
|
754
|
-
def
|
755
|
-
def
|
756
|
-
def
|
757
|
-
def
|
758
|
-
def
|
759
|
-
def
|
760
|
-
def
|
761
|
-
def
|
762
|
-
def
|
763
|
-
def
|
764
|
-
def
|
765
|
-
def
|
766
|
-
def
|
767
|
-
def
|
768
|
-
def
|
769
|
-
def
|
770
|
-
def
|
771
|
-
def
|
772
|
-
def
|
773
|
-
def
|
774
|
-
def
|
775
|
-
def
|
776
|
-
def
|
777
|
-
def
|
778
|
-
def
|
779
|
-
def
|
780
|
-
def
|
781
|
-
def
|
782
|
-
def
|
783
|
-
def
|
784
|
-
def
|
785
|
-
def
|
786
|
-
def
|
787
|
-
def
|
788
|
-
def
|
789
|
-
def
|
790
|
-
def
|
791
|
-
def
|
792
|
-
def
|
793
|
-
def
|
794
|
-
def
|
795
|
-
def
|
796
|
-
def
|
797
|
-
def
|
798
|
-
def
|
799
|
-
def
|
800
|
-
def
|
801
|
-
def
|
802
|
-
def
|
803
|
-
def
|
804
|
-
def
|
805
|
-
def
|
806
|
-
def
|
807
|
-
def
|
808
|
-
|
809
|
-
def
|
810
|
-
|
811
|
-
def
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
def
|
824
|
-
def
|
825
|
-
def
|
826
|
-
def
|
827
|
-
def
|
828
|
-
def
|
829
|
-
def
|
830
|
-
def
|
831
|
-
def
|
832
|
-
def
|
833
|
-
def
|
834
|
-
def
|
835
|
-
def
|
836
|
-
def
|
837
|
-
def
|
838
|
-
def
|
839
|
-
def
|
795
|
+
def test_multiple_yields_and_multiple_returns_are_syncedtest_multiple_yields_and_multiple_returns_are_synced152,3844
|
796
|
+
def test_failure_if_no_block_giventest_failure_if_no_block_given165,4361
|
797
|
+
def test_failure_different_return_value_than_yield_returntest_failure_different_return_value_than_yield_return172,4544
|
798
|
+
def test_multiple_yieldstest_multiple_yields181,4830
|
799
|
+
def test_multiple_yields_will_yield_the_last_value_settest_multiple_yields_will_yield_the_last_value_set189,5068
|
800
|
+
def test_yielding_then_not_yielding_and_then_yielding_againtest_yielding_then_not_yielding_and_then_yielding_again200,5445
|
801
|
+
def test_yields_syntaxtest_yields_syntax211,5792
|
802
|
+
class MyError < RuntimeErrorMyError218,5937
|
803
|
+
def test_and_raises_with_exception_class_throws_exceptiontest_and_raises_with_exception_class_throws_exception221,5975
|
804
|
+
def test_and_raises_with_arguments_throws_exception_made_with_argstest_and_raises_with_arguments_throws_exception_made_with_args230,6184
|
805
|
+
def test_and_raises_with_a_specific_exception_throws_the_exceptiontest_and_raises_with_a_specific_exception_throws_the_exception240,6465
|
806
|
+
def test_raises_is_an_alias_for_and_raisetest_raises_is_an_alias_for_and_raise251,6735
|
807
|
+
def test_multiple_and_raise_clauses_will_be_done_sequentiallytest_multiple_and_raise_clauses_will_be_done_sequentially260,6935
|
808
|
+
def test_and_throw_will_throw_a_symboltest_and_throw_will_throw_a_symbol272,7333
|
809
|
+
def test_and_throw_with_expression_will_throwtest_and_throw_with_expression_will_throw283,7576
|
810
|
+
def test_throws_is_an_alias_for_and_throwtest_throws_is_an_alias_for_and_throw294,7858
|
811
|
+
def test_multiple_throws_will_be_done_sequentiallytest_multiple_throws_will_be_done_sequentially305,8133
|
812
|
+
def test_pass_thru_just_returns_undefined_on_mockstest_pass_thru_just_returns_undefined_on_mocks317,8463
|
813
|
+
def test_multiple_expectationstest_multiple_expectations324,8637
|
814
|
+
def test_with_no_args_with_no_argstest_with_no_args_with_no_args334,8868
|
815
|
+
def test_with_no_args_but_with_argstest_with_no_args_but_with_args341,8996
|
816
|
+
def test_with_any_argstest_with_any_args350,9190
|
817
|
+
def test_with_any_single_arg_matchingtest_with_any_single_arg_matching360,9368
|
818
|
+
def test_with_any_single_arg_nonmatchingtest_with_any_single_arg_nonmatching368,9561
|
819
|
+
def test_with_equal_arg_matchingtest_with_equal_arg_matching378,9796
|
820
|
+
def test_with_ducktype_arg_matchingtest_with_ducktype_arg_matching385,9959
|
821
|
+
def test_with_ducktype_arg_matching_no_matchtest_with_ducktype_arg_matching_no_match392,10138
|
822
|
+
def test_with_hash_matchingtest_with_hash_matching401,10362
|
823
|
+
def test_with_hash_non_matchingtest_with_hash_non_matching408,10550
|
824
|
+
def test_with_equal_arg_nonmatchingtest_with_equal_arg_nonmatching417,10770
|
825
|
+
def test_with_optional_proctest_with_optional_proc426,11007
|
826
|
+
def test_with_optional_proc_and_missing_proctest_with_optional_proc_and_missing_proc433,11155
|
827
|
+
def test_with_optional_proc_distinquishes_between_nil_and_missingtest_with_optional_proc_distinquishes_between_nil_and_missing440,11316
|
828
|
+
def test_with_arbitrary_arg_matchingtest_with_arbitrary_arg_matching448,11547
|
829
|
+
def test_args_matching_with_regextest_args_matching_with_regex463,11978
|
830
|
+
def test_arg_matching_with_regex_matching_non_stringtest_arg_matching_with_regex_matching_non_string475,12299
|
831
|
+
def test_arg_matching_with_classtest_arg_matching_with_class482,12476
|
832
|
+
def test_arg_matching_with_no_matchtest_arg_matching_with_no_match493,12760
|
833
|
+
def test_arg_matching_with_string_doesnt_over_matchtest_arg_matching_with_string_doesnt_over_match502,12973
|
834
|
+
def test_block_arg_given_to_no_argstest_block_arg_given_to_no_args511,13192
|
835
|
+
def test_block_arg_given_to_matching_proctest_block_arg_given_to_matching_proc520,13396
|
836
|
+
def test_arg_matching_precedence_when_best_firsttest_arg_matching_precedence_when_best_first531,13681
|
837
|
+
def test_arg_matching_precedence_when_best_last_but_still_matches_firsttest_arg_matching_precedence_when_best_last_but_still_matches_first539,13890
|
838
|
+
def test_never_and_never_calledtest_never_and_never_called547,14122
|
839
|
+
def test_never_and_called_oncetest_never_and_called_once553,14237
|
840
|
+
def test_once_called_oncetest_once_called_once562,14424
|
841
|
+
def test_once_but_never_calledtest_once_but_never_called569,14558
|
842
|
+
def test_once_but_called_twicetest_once_but_called_twice577,14740
|
843
|
+
def test_twice_and_called_twicetest_twice_and_called_twice587,14954
|
844
|
+
def test_zero_or_more_called_zerotest_zero_or_more_called_zero595,15109
|
845
|
+
def test_zero_or_more_called_oncetest_zero_or_more_called_once601,15231
|
846
|
+
def test_zero_or_more_called_100test_zero_or_more_called_100608,15364
|
847
|
+
def test_timestest_times615,15510
|
848
|
+
def test_at_least_called_oncetest_at_least_called_once622,15651
|
849
|
+
def test_at_least_but_never_calledtest_at_least_but_never_called629,15798
|
850
|
+
def test_at_least_once_but_called_twicetest_at_least_once_but_called_twice637,15996
|
851
|
+
def test_at_least_and_exacttest_at_least_and_exact645,16167
|
852
|
+
def test_at_most_but_never_calledtest_at_most_but_never_called655,16392
|
853
|
+
def test_at_most_called_oncetest_at_most_called_once661,16528
|
854
|
+
def test_at_most_called_twicetest_at_most_called_twice668,16673
|
855
|
+
def test_at_most_and_at_least_called_nevertest_at_most_and_at_least_called_never678,16896
|
856
|
+
def test_at_most_and_at_least_called_oncetest_at_most_and_at_least_called_once686,17116
|
857
|
+
def test_at_most_and_at_least_called_twicetest_at_most_and_at_least_called_twice693,17289
|
858
|
+
def test_at_most_and_at_least_called_three_timestest_at_most_and_at_least_called_three_times701,17477
|
859
|
+
def test_call_counts_only_apply_to_matching_argstest_call_counts_only_apply_to_matching_args712,17750
|
860
|
+
def test_call_counts_only_apply_to_matching_args_with_mismatchtest_call_counts_only_apply_to_matching_args_with_mismatch724,18028
|
861
|
+
def test_ordered_calls_in_order_will_passtest_ordered_calls_in_order_will_pass740,18461
|
862
|
+
def test_ordered_calls_out_of_order_will_failtest_ordered_calls_out_of_order_will_fail750,18643
|
863
|
+
def test_order_calls_with_different_arg_lists_and_in_order_will_passtest_order_calls_with_different_arg_lists_and_in_order_will_pass762,18899
|
864
|
+
def test_order_calls_with_different_arg_lists_and_out_of_order_will_failtest_order_calls_with_different_arg_lists_and_out_of_order_will_fail772,19146
|
865
|
+
def test_unordered_calls_do_not_effect_ordered_testingtest_unordered_calls_do_not_effect_ordered_testing784,19467
|
866
|
+
def test_ordered_with_multiple_calls_will_passtest_ordered_with_multiple_calls_will_pass798,19731
|
867
|
+
def test_grouped_ordering_with_numberstest_grouped_ordering_with_numbers810,19940
|
868
|
+
def test_grouped_ordering_with_symbolstest_grouped_ordering_with_symbols825,20255
|
869
|
+
def test_explicit_ordering_mixed_with_implicit_ordering_should_not_overlaptest_explicit_ordering_mixed_with_implicit_ordering_should_not_overlap840,20611
|
870
|
+
def test_explicit_ordering_with_explicit_misorderstest_explicit_ordering_with_explicit_misorders850,20984
|
871
|
+
def test_ordering_with_explicit_no_args_matches_correctlytest_ordering_with_explicit_no_args_matches_correctly866,21507
|
872
|
+
def test_ordering_with_any_arg_matching_correctly_matchestest_ordering_with_any_arg_matching_correctly_matches878,21880
|
873
|
+
def test_ordering_between_mocks_is_not_normally_definedtest_ordering_between_mocks_is_not_normally_defined889,22188
|
874
|
+
def test_ordering_between_mocks_is_honored_for_global_orderingtest_ordering_between_mocks_is_honored_for_global_ordering901,22442
|
875
|
+
def test_expectation_formatingtest_expectation_formating913,22746
|
876
|
+
def test_multi_expectation_formattingtest_multi_expectation_formatting922,22974
|
877
|
+
def test_explicit_ordering_with_limits_allow_multiple_return_valuestest_explicit_ordering_with_limits_allow_multiple_return_values928,23137
|
878
|
+
def test_global_methods_can_be_mockedtest_global_methods_can_be_mocked947,23848
|
879
|
+
def test_kernel_methods_can_be_mockedtest_kernel_methods_can_be_mocked953,24032
|
880
|
+
def test_undefing_kernel_methods_dont_effect_other_mockstest_undefing_kernel_methods_dont_effect_other_mocks959,24210
|
881
|
+
def test_expectations_can_by_marked_as_defaulttest_expectations_can_by_marked_as_default967,24478
|
882
|
+
def test_default_expectations_are_search_in_the_proper_ordertest_default_expectations_are_search_in_the_proper_order973,24640
|
883
|
+
def test_expectations_with_count_constraints_can_by_marked_as_defaulttest_expectations_with_count_constraints_can_by_marked_as_default981,24943
|
884
|
+
def test_default_expectations_are_overridden_by_later_expectationstest_default_expectations_are_overridden_by_later_expectations989,25179
|
885
|
+
def test_default_expectations_can_be_changed_by_later_expectationstest_default_expectations_can_be_changed_by_later_expectations997,25407
|
886
|
+
def test_ordered_default_expectations_can_be_specifiedtest_ordered_default_expectations_can_be_specified1008,25769
|
887
|
+
def test_ordered_default_expectations_can_be_overriddentest_ordered_default_expectations_can_be_overridden1016,26010
|
888
|
+
def test_by_default_works_at_mock_leveltest_by_default_works_at_mock_level1028,26281
|
889
|
+
def test_by_default_at_mock_level_does_nothing_with_no_expectationstest_by_default_at_mock_level_does_nothing_with_no_expectations1039,26556
|
890
|
+
def test_partial_mocks_can_have_default_expectationstest_partial_mocks_can_have_default_expectations1045,26701
|
891
|
+
def test_partial_mocks_can_have_default_expectations_overriddentest_partial_mocks_can_have_default_expectations_overridden1051,26882
|
892
|
+
def test_wicked_and_evil_tricks_with_by_default_are_thwartedtest_wicked_and_evil_tricks_with_by_default_are_thwarted1058,27130
|
893
|
+
def test_mocks_can_handle_multi_parameter_respond_tostest_mocks_can_handle_multi_parameter_respond_tos1070,27535
|
894
|
+
def test_can_mock_operatorstest_can_mock_operators1081,27882
|
895
|
+
def assert_operator(op, &block)assert_operator1111,28946
|
896
|
+
class TestFlexMockShouldsWithInclude < Test::Unit::TestCaseTestFlexMockShouldsWithInclude1119,29100
|
897
|
+
def test_include_enables_unqualified_arg_type_referencestest_include_enables_unqualified_arg_type_references1121,29194
|
898
|
+
class TestFlexMockArgTypesDontLeak < Test::Unit::TestCaseTestFlexMockArgTypesDontLeak1129,29358
|
899
|
+
def test_unqualified_arg_type_references_are_undefined_by_defaulttest_unqualified_arg_type_references_are_undefined_by_default1130,29416
|
900
|
+
|
901
|
+
test/spys_test.rb,2374
|
902
|
+
class TestSpys < Test::Unit::TestCaseTestSpys5,48
|
903
|
+
class FooBarFooBar8,116
|
904
|
+
def foofoo9,131
|
905
|
+
def barbar12,165
|
906
|
+
def setupsetup16,192
|
907
|
+
def test_spy_detects_simple_calltest_spy_detects_simple_call21,254
|
908
|
+
def test_spy_detects_simple_call_ignoring_argstest_spy_detects_simple_call_ignoring_args26,342
|
909
|
+
def test_spy_rejects_a_never_made_calltest_spy_rejects_a_never_made_call31,451
|
910
|
+
def test_spy_detects_call_with_literal_argtest_spy_detects_call_with_literal_arg36,549
|
911
|
+
def test_spy_detects_call_with_class_argtest_spy_detects_call_with_class_arg41,653
|
912
|
+
def test_spy_rejects_call_with_non_matching_literal_argtest_spy_rejects_call_with_non_matching_literal_arg46,761
|
913
|
+
def test_spy_detects_call_with_multiple_argumentstest_spy_detects_call_with_multiple_arguments51,882
|
914
|
+
def test_spy_detects_multiple_calls_with_different_argumentstest_spy_detects_multiple_calls_with_different_arguments56,1021
|
915
|
+
def test_spy_rejects_if_times_options_not_matchingtest_spy_rejects_if_times_options_not_matching62,1174
|
916
|
+
def test_spy_detects_a_blocktest_spy_detects_a_block68,1321
|
917
|
+
def test_spy_rejects_a_blocktest_spy_rejects_a_block73,1415
|
918
|
+
def test_spy_detects_a_missing_blocktest_spy_detects_a_missing_block78,1531
|
919
|
+
def test_spy_rejects_a_missing_blocktest_spy_rejects_a_missing_block83,1647
|
920
|
+
def test_spy_ignores_blocktest_spy_ignores_block88,1749
|
921
|
+
def test_spy_methods_can_be_stubbedtest_spy_methods_can_be_stubbed93,1841
|
922
|
+
def test_spy_cannot_see_normal_methodstest_spy_cannot_see_normal_methods100,2016
|
923
|
+
def test_spy_cannot_see_normal_methods2test_spy_cannot_see_normal_methods2107,2173
|
924
|
+
def test_calling_non_spy_base_methods_is_an_errortest_calling_non_spy_base_methods_is_an_error114,2358
|
925
|
+
def test_cant_put_expectations_on_non_base_class_methodsxtest_cant_put_expectations_on_non_base_class_methodsx120,2475
|
926
|
+
def test_cant_put_expectations_on_non_base_class_methods_unless_explicittest_cant_put_expectations_on_non_base_class_methods_unless_explicit129,2815
|
927
|
+
def test_ok_to_use_explicit_even_when_its_not_neededtest_ok_to_use_explicit_even_when_its_not_needed135,3001
|
928
|
+
def test_can_spy_on_partial_mockstest_can_spy_on_partial_mocks141,3167
|
929
|
+
def test_can_spy_on_class_defined_methodstest_can_spy_on_class_defined_methods150,3381
|
930
|
+
def test_can_spy_on_regular_mockstest_can_spy_on_regular_mocks156,3543
|
840
931
|
|
841
932
|
test/test_setup.rb,180
|
842
933
|
class FlexMockFlexMock7,91
|
@@ -850,7 +941,7 @@ class TestFlexmockTestUnit < Test::Unit::TestCaseTestFlexmockTestUnit17,375
|
|
850
941
|
def test_can_create_mockstest_can_create_mocks23,484
|
851
942
|
def test_should_fail__mocks_are_auto_verifiedtest_should_fail__mocks_are_auto_verified30,627
|
852
943
|
|
853
|
-
/var/folders/b9/zwv8g_296jq17rcjpjw_94jc0000gn/T//tags.
|
944
|
+
/var/folders/b9/zwv8g_296jq17rcjpjw_94jc0000gn/T//tags.g8fD5C,1606
|
854
945
|
class TestTuIntegrationFlexMockMethod < Test::Unit::TestCaseTestTuIntegrationFlexMockMethod19,548
|
855
946
|
def test_can_construct_flexmocktest_can_construct_flexmock22,643
|
856
947
|
def test_can_construct_flexmock_with_blocktest_can_construct_flexmock_with_block28,800
|
@@ -884,3 +975,8 @@ class UndefinedTest < Test::Unit::TestCaseUndefinedTest14,321
|
|
884
975
|
def test_undefined_is_not_niltest_undefined_is_not_nil74,1903
|
885
976
|
def assert_undefined(obj)assert_undefined80,1981
|
886
977
|
def undefinedundefined84,2044
|
978
|
+
|
979
|
+
(null),0
|
980
|
+
|
981
|
+
,22
|
982
|
+
module TagsTags4,36
|