flexmock 0.7.1 → 0.8.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 +17 -1
- data/README +84 -10
- data/Rakefile +11 -11
- data/TAGS +278 -195
- data/doc/releases/flexmock-0.8.0.rdoc +108 -0
- data/lib/flexmock/base.rb +1 -0
- data/lib/flexmock/core.rb +22 -15
- data/lib/flexmock/errors.rb +23 -0
- data/lib/flexmock/expectation.rb +38 -0
- data/lib/flexmock/expectation_director.rb +30 -10
- data/lib/flexmock/mock_container.rb +1 -1
- data/lib/flexmock/partial_mock.rb +8 -1
- data/lib/flexmock/rails/view_mocking.rb +30 -0
- data/lib/flexmock/rails.rb +15 -0
- data/lib/flexmock/undefined.rb +50 -0
- data/test/test_aliasing.rb +60 -0
- data/test/test_deprecated_methods.rb +1 -1
- data/test/test_examples_from_readme.rb +158 -0
- data/test/test_partial_mock.rb +42 -0
- data/test/test_rails_view_stub.rb +57 -0
- data/test/test_samples.rb +244 -0
- data/test/test_should_ignore_missing.rb +82 -0
- data/test/test_should_receive.rb +126 -3
- data/test/test_undefined.rb +88 -0
- metadata +13 -3
- data/test/test_example.rb +0 -36
data/TAGS
CHANGED
@@ -34,24 +34,23 @@ lib/flexmock/base.rb,0
|
|
34
34
|
lib/flexmock/composite.rb,30
|
35
35
|
class FlexMockFlexMock8,133
|
36
36
|
|
37
|
-
lib/flexmock/core.rb,
|
38
|
-
class FlexMockFlexMock
|
39
|
-
|
40
|
-
|
41
|
-
def
|
42
|
-
def
|
43
|
-
def
|
44
|
-
def
|
45
|
-
def
|
46
|
-
def
|
47
|
-
def
|
48
|
-
def
|
49
|
-
def
|
50
|
-
def
|
51
|
-
def
|
52
|
-
def
|
53
|
-
def
|
54
|
-
def sclasssclass206,6081
|
37
|
+
lib/flexmock/core.rb,857
|
38
|
+
class FlexMockFlexMock46,1290
|
39
|
+
def initialize(name="unknown", container=nil)initialize55,1560
|
40
|
+
def inspectinspect65,1854
|
41
|
+
def flexmock_verifyflexmock_verify71,2014
|
42
|
+
def flexmock_teardownflexmock_teardown82,2255
|
43
|
+
def should_ignore_missingshould_ignore_missing86,2335
|
44
|
+
def method_missing(sym, *args, &block)method_missing92,2510
|
45
|
+
def respond_to?(sym)respond_to?109,2982
|
46
|
+
def flexmock_find_expectation(method_name, *args) # :nodoc:flexmock_find_expectation114,3131
|
47
|
+
def flexmock_expectations_for(method_name) # :nodoc:flexmock_expectations_for120,3336
|
48
|
+
def method(sym)method125,3495
|
49
|
+
def should_receive(*args)should_receive154,4534
|
50
|
+
def should_expectshould_expect176,5237
|
51
|
+
def flexmock_wrap(&block)flexmock_wrap184,5427
|
52
|
+
def override_existing_method(sym)override_existing_method198,5986
|
53
|
+
def sclasssclass207,6206
|
55
54
|
|
56
55
|
lib/flexmock/core_class_methods.rb,289
|
57
56
|
class FlexMockFlexMock15,371
|
@@ -79,7 +78,12 @@ class FlexMockFlexMock33,827
|
|
79
78
|
def any_instance(&block)any_instance53,1572
|
80
79
|
module OrderingOrdering59,1720
|
81
80
|
|
82
|
-
lib/flexmock/
|
81
|
+
lib/flexmock/errors.rb,137
|
82
|
+
class FlexMockFlexMock14,338
|
83
|
+
class UsageError < ::RuntimeErrorUsageError17,406
|
84
|
+
class MockError < ::RuntimeErrorMockError20,449
|
85
|
+
|
86
|
+
lib/flexmock/expectation.rb,2060
|
83
87
|
class FlexMockFlexMock14,337
|
84
88
|
class ExpectationExpectation28,872
|
85
89
|
def initialize(mock, sym)initialize34,1018
|
@@ -89,48 +93,53 @@ class FlexMockFlexMock14,337
|
|
89
93
|
def return_value(args)return_value69,1922
|
90
94
|
def perform_yielding(args)perform_yielding83,2245
|
91
95
|
def eligible?eligible?99,2822
|
92
|
-
def
|
93
|
-
def
|
94
|
-
def
|
95
|
-
def
|
96
|
-
def
|
97
|
-
def
|
98
|
-
def
|
99
|
-
def
|
100
|
-
def
|
101
|
-
def
|
102
|
-
def
|
103
|
-
def
|
104
|
-
def
|
105
|
-
def
|
106
|
-
def
|
107
|
-
def
|
108
|
-
def
|
109
|
-
def
|
110
|
-
def
|
111
|
-
def
|
112
|
-
def
|
113
|
-
|
114
|
-
def
|
115
|
-
def
|
116
|
-
|
117
|
-
def
|
118
|
-
def
|
119
|
-
def
|
120
|
-
def
|
121
|
-
|
122
|
-
def
|
123
|
-
def
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
def
|
133
|
-
def
|
96
|
+
def call_count_constrained?call_count_constrained?104,2971
|
97
|
+
def validate_ordervalidate_order109,3081
|
98
|
+
def flexmock_verifyflexmock_verify121,3456
|
99
|
+
def match_args(args)match_args129,3653
|
100
|
+
def match_arg(expected, actual)match_arg138,3999
|
101
|
+
def with(*args)with145,4228
|
102
|
+
def with_no_argswith_no_args151,4362
|
103
|
+
def with_any_argswith_any_args157,4495
|
104
|
+
def and_return(*args, &block)and_return188,5504
|
105
|
+
def and_return_undefinedand_return_undefined212,6217
|
106
|
+
def and_yield(*yield_values)and_yield228,6786
|
107
|
+
def and_raise(exception, *args)and_raise252,7549
|
108
|
+
def and_throw(sym, value=nil)and_throw266,7914
|
109
|
+
def zero_or_more_timeszero_or_more_times272,8089
|
110
|
+
def times(limit)times279,8312
|
111
|
+
def nevernever288,8659
|
112
|
+
def onceonce295,8874
|
113
|
+
def twicetwice302,9089
|
114
|
+
def at_leastat_least314,9415
|
115
|
+
def at_mostat_most327,9794
|
116
|
+
def ordered(group_name=nil)ordered356,11063
|
117
|
+
def globallyglobally368,11443
|
118
|
+
def define_ordered(group_name, ordering)define_ordered374,11558
|
119
|
+
def by_defaultby_default388,12056
|
120
|
+
class CompositeExpectationCompositeExpectation399,12463
|
121
|
+
def initializeinitialize402,12537
|
122
|
+
def add(expectation)add407,12633
|
123
|
+
def method_missing(sym, *args, &block)method_missing412,12774
|
124
|
+
def order_numberorder_number423,13153
|
125
|
+
def mockmock428,13263
|
126
|
+
def should_receive(*args, &block)should_receive434,13431
|
127
|
+
def to_sto_s439,13577
|
128
|
+
class ExpectationRecorderExpectationRecorder453,14035
|
129
|
+
def initializeinitialize456,14095
|
130
|
+
def method_missing(sym, *args, &block)method_missing461,14206
|
131
|
+
def apply(mock)apply469,14482
|
132
|
+
|
133
|
+
lib/flexmock/expectation_director.rb,483
|
134
|
+
class FlexMockFlexMock15,363
|
135
|
+
class ExpectationDirectorExpectationDirector20,574
|
136
|
+
def initialize(sym)initialize23,658
|
137
|
+
def call(*args)call38,1207
|
138
|
+
def <<(expectation)<<46,1460
|
139
|
+
def find_expectation(*args) # :nodoc:find_expectation51,1584
|
140
|
+
def flexmock_verify # :nodoc:flexmock_verify59,1909
|
141
|
+
def defaultify_expectation(exp) # :nodoc:defaultify_expectation66,2120
|
142
|
+
def find_expectation_in(expectations, *args)find_expectation_in78,2431
|
134
143
|
|
135
144
|
lib/flexmock/mock_container.rb,882
|
136
145
|
class FlexMockFlexMock15,371
|
@@ -142,12 +151,12 @@ class FlexMockFlexMock15,371
|
|
142
151
|
def flexmock_remember(mocking_object)flexmock_remember157,5960
|
143
152
|
class MockContainerHelperMockContainerHelper173,6610
|
144
153
|
def next_idnext_id177,6719
|
145
|
-
def parse_should_args(mock, args, &block) # :nodoc:parse_should_args190,
|
146
|
-
def add_model_methods(mock, model_class, id)add_model_methods208,
|
147
|
-
def make_partial_proxy(container, obj, name, safe_mode)make_partial_proxy229,
|
148
|
-
def build_demeter_chain(mock, arg, &block)build_demeter_chain274,
|
149
|
-
def check_proper_mock(mock, method_name)check_proper_mock299,
|
150
|
-
def check_method_names(names)check_method_names
|
154
|
+
def parse_should_args(mock, args, &block) # :nodoc:parse_should_args190,7192
|
155
|
+
def add_model_methods(mock, model_class, id)add_model_methods208,7705
|
156
|
+
def make_partial_proxy(container, obj, name, safe_mode)make_partial_proxy229,8443
|
157
|
+
def build_demeter_chain(mock, arg, &block)build_demeter_chain274,10296
|
158
|
+
def check_proper_mock(mock, method_name)check_proper_mock299,11147
|
159
|
+
def check_method_names(names)check_method_names309,11554
|
151
160
|
|
152
161
|
lib/flexmock/noop.rb,0
|
153
162
|
|
@@ -160,7 +169,7 @@ class FlexMockFlexMock12,312
|
|
160
169
|
def flexmock_current_order=(value)flexmock_current_order=39,1145
|
161
170
|
def flexmock_validate_order(method_name, order_number)flexmock_validate_order43,1231
|
162
171
|
|
163
|
-
lib/flexmock/partial_mock.rb,
|
172
|
+
lib/flexmock/partial_mock.rb,1380
|
164
173
|
class FlexMockFlexMock14,337
|
165
174
|
class PartialMockProxyPartialMockProxy26,968
|
166
175
|
def initialize(obj, mock, safe_mode)initialize40,1310
|
@@ -173,16 +182,17 @@ class FlexMockFlexMock14,337
|
|
173
182
|
def flexmock_teardownflexmock_teardown145,4849
|
174
183
|
def flexmock_containerflexmock_container157,5187
|
175
184
|
def flexmock_container=(container)flexmock_container=163,5382
|
176
|
-
def
|
177
|
-
def
|
178
|
-
def
|
179
|
-
def
|
180
|
-
def
|
181
|
-
def
|
182
|
-
def
|
183
|
-
def
|
184
|
-
def
|
185
|
-
def
|
185
|
+
def flexmock_expectations_for(method_name)flexmock_expectations_for167,5498
|
186
|
+
def sclasssclass174,5659
|
187
|
+
def singleton?(method_name)singleton?180,5800
|
188
|
+
def hide_existing_method(method_name)hide_existing_method190,6262
|
189
|
+
def stow_existing_definition(method_name)stow_existing_definition197,6479
|
190
|
+
def create_alias_for_existing_method(method_name)create_alias_for_existing_method217,7196
|
191
|
+
def define_proxy_method(method_name)define_proxy_method235,7715
|
192
|
+
def restore_original_definition(method_name)restore_original_definition256,8415
|
193
|
+
def remove_current_method(method_name)remove_current_method268,8779
|
194
|
+
def detached?detached?273,8940
|
195
|
+
def new_name(old_name)new_name278,9048
|
186
196
|
|
187
197
|
lib/flexmock/recorder.rb,271
|
188
198
|
class FlexMockFlexMock14,347
|
@@ -213,6 +223,16 @@ class FlexMockFlexMock15,357
|
|
213
223
|
class TestUnitFrameworkAdapterTestUnitFrameworkAdapter45,1301
|
214
224
|
def assertion_failed_errorassertion_failed_error47,1369
|
215
225
|
|
226
|
+
lib/flexmock/undefined.rb,288
|
227
|
+
class FlexMockFlexMock12,312
|
228
|
+
class UndefinedUndefined17,483
|
229
|
+
def method_missing(sym, *args, &block)method_missing18,501
|
230
|
+
def to_sto_s22,564
|
231
|
+
def inspectinspect26,606
|
232
|
+
def cloneclone30,642
|
233
|
+
def coerce(other)coerce34,680
|
234
|
+
def self.undefinedundefined43,885
|
235
|
+
|
216
236
|
lib/flexmock/validators.rb,545
|
217
237
|
class FlexMockFlexMock14,337
|
218
238
|
class CountValidatorCountValidator19,473
|
@@ -236,6 +256,20 @@ class FlexMockFlexMock3,20
|
|
236
256
|
module RedirectErrorRedirectError4,35
|
237
257
|
def redirect_errorredirect_error5,58
|
238
258
|
|
259
|
+
test/test_aliasing.rb,522
|
260
|
+
class FlexMockFlexMock6,61
|
261
|
+
module StubsAndExpectsStubsAndExpects7,76
|
262
|
+
def expects(*args)expects8,101
|
263
|
+
def stubs(*args)stubs13,247
|
264
|
+
module MockContainerMockContainer18,311
|
265
|
+
class PartialMockProxyPartialMockProxy25,420
|
266
|
+
class AliasingTest < Test::Unit::TestCaseAliasingTest31,523
|
267
|
+
def test_mockingtest_mocking34,595
|
268
|
+
def test_once_mockingtest_once_mocking40,756
|
269
|
+
def test_twice_mockingtest_twice_mocking44,854
|
270
|
+
def test_stubbingtest_stubbing49,1033
|
271
|
+
def test_partialtest_partial54,1158
|
272
|
+
|
239
273
|
test/test_container_methods.rb,1111
|
240
274
|
class TestFlexmockContainerMethods < Test::Unit::TestCaseTestFlexmockContainerMethods16,410
|
241
275
|
def test_simple_mock_creationtest_simple_mock_creation19,498
|
@@ -261,22 +295,24 @@ class TestFlexmockDefaultFrameworkAdapter < Test::Unit::TestCaseTestFlexmockDef
|
|
261
295
|
def test_assert_equal_doesnt_raise_exceptiontest_assert_equal_doesnt_raise_exception30,794
|
262
296
|
def test_assert_equal_can_failtest_assert_equal_can_fail34,900
|
263
297
|
|
264
|
-
test/test_demeter_mocking.rb,
|
298
|
+
test/test_demeter_mocking.rb,1569
|
265
299
|
class TestDemeterMocking < Test::Unit::TestCaseTestDemeterMocking7,84
|
266
300
|
def test_demeter_mockingtest_demeter_mocking11,199
|
267
|
-
def
|
268
|
-
def
|
269
|
-
def
|
270
|
-
def
|
271
|
-
def
|
272
|
-
def
|
273
|
-
def
|
274
|
-
def
|
275
|
-
def
|
276
|
-
def
|
277
|
-
def
|
278
|
-
def
|
279
|
-
def
|
301
|
+
def test_demeter_mocking_with_operatorstest_demeter_mocking_with_operators19,426
|
302
|
+
def test_demeter_mocking_with_multiple_operatorstest_demeter_mocking_with_multiple_operators28,715
|
303
|
+
def test_multiple_demeter_mocks_on_same_branch_is_oktest_multiple_demeter_mocks_on_same_branch_is_ok34,876
|
304
|
+
def test_multi_level_deep_demeter_violationtest_multi_level_deep_demeter_violation42,1168
|
305
|
+
def test_final_method_can_have_multiple_expecationstest_final_method_can_have_multiple_expecations48,1353
|
306
|
+
def test_conflicting_mock_declarations_raises_an_errortest_conflicting_mock_declarations_raises_an_error56,1644
|
307
|
+
def test_conflicting_mock_declarations_in_reverse_order_does_not_raise_errortest_conflicting_mock_declarations_in_reverse_order_does_not_raise_error68,2049
|
308
|
+
def test_preestablishing_existing_mock_is_oktest_preestablishing_existing_mock_is_ok78,2393
|
309
|
+
def test_quick_defs_can_use_demeter_mockingtest_quick_defs_can_use_demeter_mocking86,2656
|
310
|
+
def test_quick_defs_can_use_demeter_mocking_twotest_quick_defs_can_use_demeter_mocking_two96,2965
|
311
|
+
def test_errors_on_ill_formed_method_namestest_errors_on_ill_formed_method_names103,3194
|
312
|
+
def test_no_errors_on_well_formed_method_namestest_no_errors_on_well_formed_method_names112,3448
|
313
|
+
def test_readme_example_1test_readme_example_1121,3666
|
314
|
+
def test_readme_example_2test_readme_example_2131,4040
|
315
|
+
def test_readme_example_3test_readme_example_3137,4241
|
280
316
|
|
281
317
|
test/test_deprecated_methods.rb,2237
|
282
318
|
class TestFlexMock < Test::Unit::TestCaseTestFlexMock17,420
|
@@ -304,12 +340,12 @@ class TestFlexMock < Test::Unit::TestCaseTestFlexMock17,420
|
|
304
340
|
def test_method_proc_raises_error_on_unknowntest_method_proc_raises_error_on_unknown168,3840
|
305
341
|
def test_method_returns_callable_proctest_method_returns_callable_proc174,3958
|
306
342
|
def test_method_returns_do_nothing_proc_for_missing_methodstest_method_returns_do_nothing_proc_for_missing_methods183,4214
|
307
|
-
class TestDeprecatedOrderingMethods < Test::Unit::TestCaseTestDeprecatedOrderingMethods191,
|
308
|
-
def test_deprecated_ordering_methodstest_deprecated_ordering_methods195,
|
309
|
-
class TestAnyInstance < Test::Unit::TestCaseTestAnyInstance207,
|
310
|
-
class DogDog211,
|
311
|
-
def barkbark212,
|
312
|
-
def test_any_instance_still_works_for_backwards_compatibilitytest_any_instance_still_works_for_backwards_compatibility217,
|
343
|
+
class TestDeprecatedOrderingMethods < Test::Unit::TestCaseTestDeprecatedOrderingMethods191,4441
|
344
|
+
def test_deprecated_ordering_methodstest_deprecated_ordering_methods195,4564
|
345
|
+
class TestAnyInstance < Test::Unit::TestCaseTestAnyInstance207,4960
|
346
|
+
class DogDog211,5069
|
347
|
+
def barkbark212,5081
|
348
|
+
def test_any_instance_still_works_for_backwards_compatibilitytest_any_instance_still_works_for_backwards_compatibility217,5121
|
313
349
|
|
314
350
|
test/test_example.rb,278
|
315
351
|
class TemperatureSamplerTemperatureSampler15,352
|
@@ -384,7 +420,7 @@ class TestNewInstances < Test::Unit::TestCaseTestNewInstances16,382
|
|
384
420
|
def test_ordering_can_be_specifiedtest_ordering_can_be_specified191,5009
|
385
421
|
def test_ordering_can_be_specified_in_groupstest_ordering_can_be_specified_in_groups199,5205
|
386
422
|
|
387
|
-
test/test_partial_mock.rb,
|
423
|
+
test/test_partial_mock.rb,4530
|
388
424
|
class TestStubbing < Test::Unit::TestCaseTestStubbing16,372
|
389
425
|
class DogDog19,446
|
390
426
|
def barkbark20,458
|
@@ -429,6 +465,10 @@ class TestStubbing < Test::Unit::TestCaseTestStubbing16,372
|
|
429
465
|
def respond_to?(method_name)respond_to?293,8375
|
430
466
|
def test_liar_actually_liestest_liar_actually_lies303,8544
|
431
467
|
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_there309,8696
|
468
|
+
class ValueObjectValueObject320,9125
|
469
|
+
def initialize(val)initialize323,9167
|
470
|
+
def ==(other)==327,9217
|
471
|
+
def test_partial_mocks_in_the_presense_of_equal_definitiontest_partial_mocks_in_the_presense_of_equal_definition332,9274
|
432
472
|
|
433
473
|
test/test_record_mode.rb,1339
|
434
474
|
class TestRecordMode < Test::Unit::TestCaseTestRecordMode16,390
|
@@ -450,102 +490,129 @@ class TestSamples < Test::Unit::TestCaseTestSamples17,378
|
|
450
490
|
def test_file_iotest_file_io25,748
|
451
491
|
def count_lines(file)count_lines33,999
|
452
492
|
|
453
|
-
test/
|
454
|
-
|
455
|
-
|
456
|
-
def
|
457
|
-
|
458
|
-
def
|
459
|
-
def
|
460
|
-
def
|
461
|
-
def
|
462
|
-
def
|
463
|
-
def
|
464
|
-
def
|
465
|
-
def
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
def
|
471
|
-
|
472
|
-
def
|
473
|
-
def
|
474
|
-
|
475
|
-
def
|
476
|
-
def
|
477
|
-
def
|
478
|
-
def
|
479
|
-
def
|
480
|
-
def
|
481
|
-
def
|
482
|
-
def
|
483
|
-
def
|
484
|
-
def
|
485
|
-
def
|
486
|
-
def
|
487
|
-
def
|
488
|
-
def
|
489
|
-
def
|
490
|
-
|
491
|
-
def
|
492
|
-
def
|
493
|
-
def
|
494
|
-
def
|
495
|
-
def
|
496
|
-
def
|
497
|
-
def
|
498
|
-
def
|
499
|
-
def
|
500
|
-
def
|
501
|
-
def
|
502
|
-
def
|
503
|
-
def
|
504
|
-
def
|
505
|
-
def
|
506
|
-
def
|
507
|
-
def
|
508
|
-
def
|
509
|
-
def
|
510
|
-
def
|
511
|
-
def
|
512
|
-
def
|
513
|
-
def
|
514
|
-
def
|
515
|
-
def
|
516
|
-
def
|
517
|
-
def
|
518
|
-
def
|
519
|
-
def
|
520
|
-
def
|
521
|
-
def
|
522
|
-
def
|
523
|
-
def
|
524
|
-
def
|
525
|
-
def
|
526
|
-
def
|
527
|
-
def
|
528
|
-
def
|
529
|
-
def
|
530
|
-
def
|
531
|
-
def
|
532
|
-
def
|
533
|
-
def
|
534
|
-
def
|
535
|
-
def
|
536
|
-
def
|
537
|
-
def
|
538
|
-
def
|
539
|
-
def
|
540
|
-
def
|
541
|
-
def
|
542
|
-
def
|
543
|
-
def
|
544
|
-
def
|
545
|
-
|
546
|
-
def
|
547
|
-
|
548
|
-
def
|
493
|
+
test/test_should_ignore_missing.rb,1173
|
494
|
+
class TestShouldIgnoreMissing < Test::Unit::TestCaseTestShouldIgnoreMissing16,375
|
495
|
+
def setupsetup19,458
|
496
|
+
def test_mocks_do_not_respond_to_undefined_methodstest_mocks_do_not_respond_to_undefined_methods23,508
|
497
|
+
def test_mocks_do_respond_to_defined_methodstest_mocks_do_respond_to_defined_methods27,612
|
498
|
+
def test_mocks_do_respond_to_any_method_when_ignoring_missingtest_mocks_do_respond_to_any_method_when_ignoring_missing32,752
|
499
|
+
def test_ignored_methods_return_undefinedtest_ignored_methods_return_undefined37,898
|
500
|
+
def test_undefined_mocking_with_argumentstest_undefined_mocking_with_arguments43,1072
|
501
|
+
def test_method_chains_with_undefined_are_self_preservingtest_method_chains_with_undefined_are_self_preserving48,1220
|
502
|
+
def test_method_proc_raises_error_on_unknowntest_method_proc_raises_error_on_unknown53,1385
|
503
|
+
def test_method_returns_callable_proctest_method_returns_callable_proc59,1509
|
504
|
+
def test_not_calling_method_proc_will_fail_count_constraintstest_not_calling_method_proc_will_fail_count_constraints66,1693
|
505
|
+
def test_method_returns_do_nothing_proc_for_missing_methodstest_method_returns_do_nothing_proc_for_missing_methods75,1965
|
506
|
+
|
507
|
+
test/test_should_receive.rb,10143
|
508
|
+
def mock_top_level_functionmock_top_level_function16,375
|
509
|
+
module KernelKernel20,416
|
510
|
+
def mock_kernel_functionmock_kernel_function21,430
|
511
|
+
class TestFlexMockShoulds < Test::Unit::TestCaseTestFlexMockShoulds26,477
|
512
|
+
def test_defaultstest_defaults38,1021
|
513
|
+
def test_returns_with_valuetest_returns_with_value47,1189
|
514
|
+
def test_returns_with_multiple_valuestest_returns_with_multiple_values55,1358
|
515
|
+
def test_multiple_returnstest_multiple_returns66,1618
|
516
|
+
def test_returns_with_blocktest_returns_with_block77,1878
|
517
|
+
def test_block_example_from_readmetest_block_example_from_readme86,2081
|
518
|
+
def test_return_with_and_without_block_interleavedtest_return_with_and_without_block_interleaved96,2377
|
519
|
+
def test_and_returns_aliastest_and_returns_alias106,2657
|
520
|
+
def test_and_return_undefinedtest_and_return_undefined113,2794
|
521
|
+
def test_and_yield_will_continue_to_yield_the_same_valuetest_and_yield_will_continue_to_yield_the_same_value123,3143
|
522
|
+
def test_and_yield_with_multiple_values_yields_the_valuestest_and_yield_with_multiple_values_yields_the_values131,3389
|
523
|
+
def test_multiple_yields_are_done_sequentiallytest_multiple_yields_are_done_sequentially138,3599
|
524
|
+
def test_failure_if_no_block_giventest_failure_if_no_block_given147,3871
|
525
|
+
def test_failure_different_return_value_than_yield_returntest_failure_different_return_value_than_yield_return154,4054
|
526
|
+
def test_multiple_yieldstest_multiple_yields163,4340
|
527
|
+
def test_multiple_yields_will_yield_the_last_value_settest_multiple_yields_will_yield_the_last_value_set171,4578
|
528
|
+
def test_yielding_then_not_yielding_and_then_yielding_againtest_yielding_then_not_yielding_and_then_yielding_again182,4955
|
529
|
+
def test_yields_syntaxtest_yields_syntax193,5302
|
530
|
+
class MyError < RuntimeErrorMyError200,5447
|
531
|
+
def test_and_raises_with_exception_class_throws_exceptiontest_and_raises_with_exception_class_throws_exception203,5485
|
532
|
+
def test_and_raises_with_arguments_throws_exception_made_with_argstest_and_raises_with_arguments_throws_exception_made_with_args212,5694
|
533
|
+
def test_and_raises_with_a_specific_exception_throws_the_exceptiontest_and_raises_with_a_specific_exception_throws_the_exception222,5975
|
534
|
+
def test_raises_is_an_alias_for_and_raisetest_raises_is_an_alias_for_and_raise233,6245
|
535
|
+
def test_multiple_and_raise_clauses_will_be_done_sequentiallytest_multiple_and_raise_clauses_will_be_done_sequentially242,6450
|
536
|
+
def test_and_throw_will_throw_a_symboltest_and_throw_will_throw_a_symbol254,6848
|
537
|
+
def test_and_throw_with_expression_will_throwtest_and_throw_with_expression_will_throw265,7091
|
538
|
+
def test_throws_is_an_alias_for_and_throwtest_throws_is_an_alias_for_and_throw276,7373
|
539
|
+
def test_multiple_throws_will_be_done_sequentiallytest_multiple_throws_will_be_done_sequentially287,7648
|
540
|
+
def test_multiple_expectationstest_multiple_expectations299,7978
|
541
|
+
def test_with_no_args_with_no_argstest_with_no_args_with_no_args309,8215
|
542
|
+
def test_with_no_args_but_with_argstest_with_no_args_but_with_args316,8343
|
543
|
+
def test_with_any_argstest_with_any_args325,8542
|
544
|
+
def test_with_any_single_arg_matchingtest_with_any_single_arg_matching335,8720
|
545
|
+
def test_with_any_single_arg_nonmatchingtest_with_any_single_arg_nonmatching343,8913
|
546
|
+
def test_with_equal_arg_matchingtest_with_equal_arg_matching353,9148
|
547
|
+
def test_with_equal_arg_nonmatchingtest_with_equal_arg_nonmatching360,9311
|
548
|
+
def test_with_arbitrary_arg_matchingtest_with_arbitrary_arg_matching369,9548
|
549
|
+
def test_args_matching_with_regextest_args_matching_with_regex384,9968
|
550
|
+
def test_arg_matching_with_regex_matching_non_stringtest_arg_matching_with_regex_matching_non_string396,10295
|
551
|
+
def test_arg_matching_with_classtest_arg_matching_with_class403,10472
|
552
|
+
def test_arg_matching_with_no_matchtest_arg_matching_with_no_match414,10762
|
553
|
+
def test_arg_matching_with_string_doesnt_over_matchtest_arg_matching_with_string_doesnt_over_match423,10975
|
554
|
+
def test_block_arg_given_to_no_argstest_block_arg_given_to_no_args432,11194
|
555
|
+
def test_block_arg_given_to_matching_proctest_block_arg_given_to_matching_proc441,11398
|
556
|
+
def test_arg_matching_precedence_when_best_firsttest_arg_matching_precedence_when_best_first452,11683
|
557
|
+
def test_arg_matching_precedence_when_best_last_but_still_matches_firsttest_arg_matching_precedence_when_best_last_but_still_matches_first460,11892
|
558
|
+
def test_never_and_never_calledtest_never_and_never_called468,12124
|
559
|
+
def test_never_and_called_oncetest_never_and_called_once474,12239
|
560
|
+
def test_once_called_oncetest_once_called_once483,12435
|
561
|
+
def test_once_but_never_calledtest_once_but_never_called490,12569
|
562
|
+
def test_once_but_called_twicetest_once_but_called_twice498,12756
|
563
|
+
def test_twice_and_called_twicetest_twice_and_called_twice508,12975
|
564
|
+
def test_zero_or_more_called_zerotest_zero_or_more_called_zero516,13130
|
565
|
+
def test_zero_or_more_called_oncetest_zero_or_more_called_once522,13252
|
566
|
+
def test_zero_or_more_called_100test_zero_or_more_called_100529,13385
|
567
|
+
def test_timestest_times536,13531
|
568
|
+
def test_at_least_called_oncetest_at_least_called_once543,13672
|
569
|
+
def test_at_least_but_never_calledtest_at_least_but_never_called550,13819
|
570
|
+
def test_at_least_once_but_called_twicetest_at_least_once_but_called_twice558,14022
|
571
|
+
def test_at_least_and_exacttest_at_least_and_exact566,14193
|
572
|
+
def test_at_most_but_never_calledtest_at_most_but_never_called576,14423
|
573
|
+
def test_at_most_called_oncetest_at_most_called_once582,14559
|
574
|
+
def test_at_most_called_twicetest_at_most_called_twice589,14704
|
575
|
+
def test_at_most_and_at_least_called_nevertest_at_most_and_at_least_called_never599,14932
|
576
|
+
def test_at_most_and_at_least_called_oncetest_at_most_and_at_least_called_once607,15157
|
577
|
+
def test_at_most_and_at_least_called_twicetest_at_most_and_at_least_called_twice614,15330
|
578
|
+
def test_at_most_and_at_least_called_three_timestest_at_most_and_at_least_called_three_times622,15518
|
579
|
+
def test_call_counts_only_apply_to_matching_argstest_call_counts_only_apply_to_matching_args633,15796
|
580
|
+
def test_call_counts_only_apply_to_matching_args_with_mismatchtest_call_counts_only_apply_to_matching_args_with_mismatch645,16074
|
581
|
+
def test_ordered_calls_in_order_will_passtest_ordered_calls_in_order_will_pass661,16507
|
582
|
+
def test_ordered_calls_out_of_order_will_failtest_ordered_calls_out_of_order_will_fail671,16689
|
583
|
+
def test_order_calls_with_different_arg_lists_and_in_order_will_passtest_order_calls_with_different_arg_lists_and_in_order_will_pass683,16950
|
584
|
+
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_fail693,17203
|
585
|
+
def test_unordered_calls_do_not_effect_ordered_testingtest_unordered_calls_do_not_effect_ordered_testing705,17529
|
586
|
+
def test_ordered_with_multiple_calls_will_passtest_ordered_with_multiple_calls_will_pass719,17799
|
587
|
+
def test_grouped_ordering_with_numberstest_grouped_ordering_with_numbers731,18014
|
588
|
+
def test_grouped_ordering_with_symbolstest_grouped_ordering_with_symbols746,18335
|
589
|
+
def test_explicit_ordering_mixed_with_implicit_ordering_should_not_overlaptest_explicit_ordering_mixed_with_implicit_ordering_should_not_overlap761,18697
|
590
|
+
def test_explicit_ordering_with_explicit_misorderstest_explicit_ordering_with_explicit_misorders771,19070
|
591
|
+
def test_ordering_with_explicit_no_args_matches_correctlytest_ordering_with_explicit_no_args_matches_correctly787,19601
|
592
|
+
def test_ordering_with_any_arg_matching_correctly_matchestest_ordering_with_any_arg_matching_correctly_matches799,19978
|
593
|
+
def test_ordering_between_mocks_is_not_normally_definedtest_ordering_between_mocks_is_not_normally_defined810,20290
|
594
|
+
def test_ordering_between_mocks_is_honored_for_global_orderingtest_ordering_between_mocks_is_honored_for_global_ordering822,20546
|
595
|
+
def test_expectation_formatingtest_expectation_formating834,20864
|
596
|
+
def test_multi_expectation_formattingtest_multi_expectation_formatting843,21092
|
597
|
+
def test_explicit_ordering_with_limits_allow_multiple_return_valuestest_explicit_ordering_with_limits_allow_multiple_return_values849,21255
|
598
|
+
def test_global_methods_can_be_mockedtest_global_methods_can_be_mocked868,21966
|
599
|
+
def test_kernel_methods_can_be_mockedtest_kernel_methods_can_be_mocked874,22150
|
600
|
+
def test_undefing_kernel_methods_dont_effect_other_mockstest_undefing_kernel_methods_dont_effect_other_mocks880,22328
|
601
|
+
def test_expectations_can_by_marked_as_defaulttest_expectations_can_by_marked_as_default888,22596
|
602
|
+
def test_default_expectations_are_search_in_the_proper_ordertest_default_expectations_are_search_in_the_proper_order894,22762
|
603
|
+
def test_expectations_with_count_constraints_can_by_marked_as_defaulttest_expectations_with_count_constraints_can_by_marked_as_default902,23069
|
604
|
+
def test_default_expectations_are_overridden_by_later_expectationstest_default_expectations_are_overridden_by_later_expectations910,23315
|
605
|
+
def test_ordered_default_expectations_can_be_specifiedtest_ordered_default_expectations_can_be_specified918,23543
|
606
|
+
def test_ordered_default_expectations_can_be_overriddentest_ordered_default_expectations_can_be_overridden926,23794
|
607
|
+
def test_partial_mocks_can_have_default_expectationstest_partial_mocks_can_have_default_expectations938,24065
|
608
|
+
def test_partial_mocks_can_have_default_expectations_overriddentest_partial_mocks_can_have_default_expectations_overridden944,24246
|
609
|
+
def test_wicked_and_evil_tricks_with_by_default_are_thwartedtest_wicked_and_evil_tricks_with_by_default_are_thwarted951,24494
|
610
|
+
def test_can_mock_operatorstest_can_mock_operators962,24842
|
611
|
+
def assert_operator(op, &block)assert_operator991,25857
|
612
|
+
class TestFlexMockShouldsWithInclude < Test::Unit::TestCaseTestFlexMockShouldsWithInclude999,26011
|
613
|
+
def test_include_enables_unqualified_arg_type_referencestest_include_enables_unqualified_arg_type_references1001,26105
|
614
|
+
class TestFlexMockArgTypesDontLeak < Test::Unit::TestCaseTestFlexMockArgTypesDontLeak1009,26269
|
615
|
+
def test_unqualified_arg_type_references_are_undefined_by_defaulttest_unqualified_arg_type_references_are_undefined_by_default1010,26327
|
549
616
|
|
550
617
|
test/test_tu_integration.rb,1570
|
551
618
|
class TestTuIntegrationFlexMockMethod < Test::Unit::TestCaseTestTuIntegrationFlexMockMethod15,352
|
@@ -566,6 +633,22 @@ class TestTuIntegrationFailurePreventsVerification < Test::Unit::TestCaseTestTu
|
|
566
633
|
def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown84,1997
|
567
634
|
def simulate_failuresimulate_failure91,2131
|
568
635
|
|
636
|
+
test/test_undefined.rb,873
|
637
|
+
class UndefinedTest < Test::Unit::TestCaseUndefinedTest15,352
|
638
|
+
def test_undefined_method_calls_return_undefinedtest_undefined_method_calls_return_undefined16,395
|
639
|
+
def test_equalstest_equals20,513
|
640
|
+
def test_math_operatorstest_math_operators25,611
|
641
|
+
def test_math_operators_reversedtest_math_operators_reversed33,820
|
642
|
+
def test_comparisonstest_comparisons41,1038
|
643
|
+
def test_comparisons_reversedtest_comparisons_reversed49,1247
|
644
|
+
def test_base_level_methodstest_base_level_methods57,1465
|
645
|
+
def test_cant_create_a_new_undefinedtest_cant_create_a_new_undefined61,1552
|
646
|
+
def test_cant_clone_undefinedtest_cant_clone_undefined65,1662
|
647
|
+
def test_string_representationstest_string_representations70,1796
|
648
|
+
def test_undefined_is_not_niltest_undefined_is_not_nil75,1934
|
649
|
+
def assert_undefined(obj)assert_undefined81,2012
|
650
|
+
def undefinedundefined85,2075
|
651
|
+
|
569
652
|
test/rspec_integration/integration_spec.rb,0
|
570
653
|
|
571
654
|
test/test_unit_integration/test_auto_test_unit.rb,263
|