flexmock 0.9.0 → 1.0.0.beta.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.
Files changed (53) hide show
  1. data/README.rdoc +325 -177
  2. data/Rakefile +22 -8
  3. data/TAGS +772 -669
  4. data/doc/releases/flexmock-1.0.0.rdoc +128 -0
  5. data/lib/flexmock.rb +1 -1
  6. data/lib/flexmock/argument_matchers.rb +16 -3
  7. data/lib/flexmock/argument_matching.rb +33 -0
  8. data/lib/flexmock/argument_types.rb +5 -1
  9. data/lib/flexmock/base.rb +1 -1
  10. data/lib/flexmock/composite.rb +3 -3
  11. data/lib/flexmock/core.rb +32 -2
  12. data/lib/flexmock/core_class_methods.rb +1 -1
  13. data/lib/flexmock/default_framework_adapter.rb +1 -1
  14. data/lib/flexmock/deprecated_methods.rb +1 -1
  15. data/lib/flexmock/errors.rb +1 -1
  16. data/lib/flexmock/expectation.rb +15 -13
  17. data/lib/flexmock/expectation_director.rb +1 -1
  18. data/lib/flexmock/explicit_needed.rb +39 -0
  19. data/lib/flexmock/mock_container.rb +8 -2
  20. data/lib/flexmock/noop.rb +1 -1
  21. data/lib/flexmock/ordering.rb +1 -1
  22. data/lib/flexmock/partial_mock.rb +12 -2
  23. data/lib/flexmock/rails.rb +1 -1
  24. data/lib/flexmock/recorder.rb +1 -1
  25. data/lib/flexmock/rspec.rb +5 -1
  26. data/lib/flexmock/rspec_spy_matcher.rb +74 -0
  27. data/lib/flexmock/spy_describers.rb +60 -0
  28. data/lib/flexmock/test_unit.rb +1 -1
  29. data/lib/flexmock/test_unit_assert_spy_called.rb +34 -0
  30. data/lib/flexmock/test_unit_integration.rb +3 -1
  31. data/lib/flexmock/undefined.rb +1 -1
  32. data/lib/flexmock/validators.rb +1 -1
  33. data/lib/flexmock/version.rb +4 -2
  34. data/test/assert_spy_called_test.rb +89 -0
  35. data/test/container_methods_test.rb +1 -1
  36. data/test/default_framework_adapter_test.rb +1 -1
  37. data/test/deprecated_methods_test.rb +1 -1
  38. data/test/examples_from_readme_test.rb +1 -1
  39. data/test/extended_should_receive_test.rb +1 -1
  40. data/test/naming_test.rb +1 -2
  41. data/test/new_instances_test.rb +1 -3
  42. data/test/partial_mock_test.rb +7 -1
  43. data/test/record_mode_test.rb +1 -1
  44. data/test/rspec_integration/integration_spec.rb +11 -3
  45. data/test/rspec_integration/spy_example_spec.rb +141 -0
  46. data/test/samples_test.rb +1 -1
  47. data/test/should_ignore_missing_test.rb +6 -2
  48. data/test/should_receive_test.rb +31 -2
  49. data/test/spys_test.rb +148 -0
  50. data/test/test_unit_integration/auto_test_unit_test.rb +1 -1
  51. data/test/tu_integration_test.rb +1 -1
  52. data/test/undefined_test.rb +1 -1
  53. metadata +16 -8
data/Rakefile CHANGED
@@ -38,7 +38,7 @@ RDOC_FILES = FileList[
38
38
  'doc/**/*.rdoc',
39
39
  ]
40
40
 
41
- task :default => [:test_all]
41
+ task :default => [:test_all, :rspec]
42
42
  task :test_all => [:test]
43
43
  task :test_units => [:test]
44
44
  task :ta => [:test_all]
@@ -59,12 +59,7 @@ Rake::TestTask.new(:test_extended) do |t|
59
59
  end
60
60
 
61
61
  task :rspec do
62
- ENV['RUBYLIB'] = "/Users/jim/working/svn/software/flexmock/lib"
63
- sh 'echo $RUBYLIB'
64
- sh "spec test/rspec_integration/*_spec.rb" rescue nil
65
- puts
66
- puts "*** There should be three failures in the above report. ***"
67
- puts
62
+ sh "rspec test/rspec_integration"
68
63
  end
69
64
 
70
65
  # RCov Target --------------------------------------------------------
@@ -83,7 +78,7 @@ end
83
78
 
84
79
  # RDoc Target --------------------------------------------------------
85
80
 
86
- task :rdoc => ["html/index.html"]
81
+ task :rdoc => ["html/index.html", :fixcss]
87
82
 
88
83
  file "html/index.html" => ["Rakefile"] + RDOC_FILES do
89
84
  sh "rdoc -o html --title FlexMock --line-numbers -m README.rdoc #{RDOC_FILES}"
@@ -93,6 +88,25 @@ file "README.rdoc" => ["Rakefile", "lib/flexmock/version.rb"] do
93
88
  ruby %{-i.bak -pe '$_.sub!(/^Version *:: *(\\d+\\.)+\\d+ *$/, "Version :: #{PKG_VERSION}")' README.rdoc} # "
94
89
  end
95
90
 
91
+ task :fixcss do
92
+ open("html/rdoc.css") do |ins|
93
+ open("html/rdoc.new", "w") do |outs|
94
+ count = 0
95
+ ins.each do |line|
96
+ if line =~ /^ *margin: +0;$/
97
+ count += 1
98
+ if count == 3
99
+ line = " margin: 0.5em 0;"
100
+ end
101
+ end
102
+ outs.puts line
103
+ end
104
+ end
105
+ end
106
+ rm_f "html/rdoc.css"
107
+ mv "html/rdoc.new", "html/rdoc.css"
108
+ end
109
+
96
110
  # Package Task -------------------------------------------------------
97
111
 
98
112
  if ! defined?(Gem)
data/TAGS CHANGED
@@ -1,69 +1,78 @@
1
1
 
2
- doc/jamis.rb,43
2
+ (null),43
3
3
  module RDocRDoc1,0
4
4
  module PagePage2,12
5
5
 
6
6
  install.rb,29
7
7
  def indir(newdir)indir7,68
8
8
 
9
- lib/flexmock/argument_matchers.rb,722
10
- class FlexMockFlexMock14,319
11
- class AnyMatcherAnyMatcher17,426
12
- def ===(target)===18,445
13
- def inspectinspect21,484
14
- class EqualMatcherEqualMatcher28,636
15
- def initialize(obj)initialize29,657
16
- def ===(target)===32,706
17
- def inspectinspect35,755
18
- class ProcMatcherProcMatcher44,966
19
- def initialize(&block)initialize45,986
20
- def ===(target)===48,1042
21
- def inspectinspect51,1096
22
- class HashMatcherHashMatcher58,1271
23
- def initialize(hash)initialize59,1291
24
- def ===(target)===62,1343
25
- def inspectinspect65,1414
26
- class DuckMatcherDuckMatcher72,1603
27
- def initialize(methods)initialize73,1623
28
- def ===(target)===76,1684
29
- def inspectinspect79,1762
30
-
31
- lib/flexmock/argument_types.rb,228
32
- class FlexMockFlexMock14,331
33
- module ArgumentTypesArgumentTypes21,624
34
- def anyany23,707
35
- def eq(obj)eq29,834
36
- def on(&block)on36,1034
37
- def hsh(hash)hsh42,1175
38
- def ducktype(*methods)ducktype48,1352
9
+ ,722
10
+ class FlexMockFlexMock14,320
11
+ class AnyMatcherAnyMatcher17,427
12
+ def ===(target)===18,446
13
+ def inspectinspect21,485
14
+ class EqualMatcherEqualMatcher28,637
15
+ def initialize(obj)initialize29,658
16
+ def ===(target)===32,707
17
+ def inspectinspect35,756
18
+ class ProcMatcherProcMatcher44,967
19
+ def initialize(&block)initialize45,987
20
+ def ===(target)===48,1043
21
+ def inspectinspect51,1097
22
+ class HashMatcherHashMatcher58,1269
23
+ def initialize(hash)initialize59,1289
24
+ def ===(target)===62,1341
25
+ def inspectinspect65,1412
26
+ class DuckMatcherDuckMatcher72,1607
27
+ def initialize(methods)initialize73,1627
28
+ def ===(target)===76,1688
29
+ def inspectinspect79,1766
30
+
31
+ lib/flexmock/argument_matching.rb,251
32
+ class FlexMockFlexMock1,0
33
+ module ArgumentMatchingArgumentMatching2,15
34
+ def all_match?(expected_args, actual_args)all_match?5,62
35
+ def match?(expected, actual)match?12,373
36
+ def block_match?(with_block, call_block)block_match?18,530
37
+
38
+ ,228
39
+ class FlexMockFlexMock14,332
40
+ module ArgumentTypesArgumentTypes21,625
41
+ def anyany23,708
42
+ def eq(obj)eq29,835
43
+ def on(&block)on36,1035
44
+ def hsh(hash)hsh42,1176
45
+ def ducktype(*methods)ducktype48,1353
39
46
 
40
47
  lib/flexmock/base.rb,0
41
48
 
42
49
  lib/flexmock/composite.rb,30
43
50
  class FlexMockFlexMock8,133
44
51
 
45
- lib/flexmock/core.rb,900
46
- class FlexMockFlexMock46,1270
47
- def initialize(name="unknown", container=nil)initialize55,1540
48
- def inspectinspect65,1834
49
- def flexmock_verifyflexmock_verify71,1994
50
- def flexmock_teardownflexmock_teardown82,2235
51
- def should_ignore_missingshould_ignore_missing86,2315
52
- def by_defaultby_default91,2427
53
- def method_missing(sym, *args, &block)method_missing97,2556
54
- def respond_to?(sym, *args)respond_to?114,3028
55
- def flexmock_find_expectation(method_name, *args) # :nodoc:flexmock_find_expectation119,3184
56
- def flexmock_expectations_for(method_name) # :nodoc:flexmock_expectations_for125,3389
57
- def method(sym)method130,3548
58
- def should_receive(*args)should_receive159,4587
59
- def should_expectshould_expect182,5330
60
- def flexmock_wrap(&block)flexmock_wrap190,5520
61
- def override_existing_method(sym)override_existing_method204,6075
62
- def sclasssclass213,6295
63
-
64
- lib/flexmock/core_class_methods.rb,289
65
- class FlexMockFlexMock15,352
66
- def use(*names)use39,1293
52
+ lib/flexmock/core.rb,1054
53
+ class FlexMockFlexMock47,1308
54
+ def initialize(name="unknown", container=nil)initialize56,1578
55
+ def inspectinspect68,1910
56
+ def flexmock_verifyflexmock_verify74,2070
57
+ def flexmock_teardownflexmock_teardown85,2311
58
+ def should_ignore_missingshould_ignore_missing89,2391
59
+ def by_defaultby_default95,2512
60
+ def method_missing(sym, *args, &block)method_missing101,2641
61
+ def respond_to?(sym, *args)respond_to?121,3243
62
+ def flexmock_find_expectation(method_name, *args) # :nodoc:flexmock_find_expectation126,3399
63
+ def flexmock_expectations_for(method_name) # :nodoc:flexmock_expectations_for132,3604
64
+ def flexmock_spies_on(base_class)flexmock_spies_on136,3697
65
+ def flexmock_was_called_with?(sym, args, options={})flexmock_was_called_with?140,3769
66
+ def method(sym)method156,4256
67
+ def should_receive(*args)should_receive185,5295
68
+ def should_expectshould_expect208,6038
69
+ def flexmock_wrap(&block)flexmock_wrap216,6228
70
+ def override_existing_method(sym)override_existing_method230,6783
71
+ def sclasssclass239,7003
72
+
73
+ ,289
74
+ class FlexMockFlexMock15,353
75
+ def use(*names)use39,1294
67
76
  def format_args(sym, args) # :nodoc:format_args53,1691
68
77
  def check(msg, &block) # :nodoc:check63,1992
69
78
  class UseContainerUseContainer70,2165
@@ -71,140 +80,142 @@ class FlexMockFlexMock15,352
71
80
  def passed?passed?79,2304
72
81
 
73
82
  lib/flexmock/default_framework_adapter.rb,345
74
- class FlexMockFlexMock14,318
75
- class DefaultFrameworkAdapterDefaultFrameworkAdapter15,333
76
- def assert_block(msg, &block)assert_block16,365
77
- def assert_equal(a, b, msg=nil)assert_equal22,478
78
- class AssertionFailedError < StandardError; endAssertionFailedError26,578
79
- def assertion_failed_errorassertion_failed_error27,630
83
+ class FlexMockFlexMock14,319
84
+ class DefaultFrameworkAdapterDefaultFrameworkAdapter15,334
85
+ def assert_block(msg, &block)assert_block16,366
86
+ def assert_equal(a, b, msg=nil)assert_equal22,479
87
+ class AssertionFailedError < StandardError; endAssertionFailedError26,579
88
+ def assertion_failed_errorassertion_failed_error27,631
80
89
 
81
90
  lib/flexmock/deprecated_methods.rb,340
82
- class ModuleModule13,295
83
- def flexmock_deprecate(*method_names)flexmock_deprecate14,308
84
- class FlexMockFlexMock33,808
85
- def mock_handle(sym, expected_count=nil, &block) # :nodoc:mock_handle40,1106
86
- class PartialMockProxyPartialMockProxy47,1396
87
- def any_instance(&block)any_instance53,1553
88
- module OrderingOrdering59,1701
89
-
90
- lib/flexmock/errors.rb,137
91
- class FlexMockFlexMock14,319
92
- class UsageError < ::RuntimeErrorUsageError17,387
93
- class MockError < ::RuntimeErrorMockError20,430
94
-
95
- lib/flexmock/expectation.rb,2059
96
- class FlexMockFlexMock14,318
97
- class ExpectationExpectation28,851
98
- def initialize(mock, sym)initialize34,997
99
- def to_sto_s49,1359
100
- def verify_call(*args)verify_call55,1541
101
- def _return_value(args) # :nodoc:_return_value64,1761
102
- def return_value(args)return_value69,1901
103
- def perform_yielding(args)perform_yielding83,2229
104
- def eligible?eligible?99,2814
105
- def call_count_constrained?call_count_constrained?104,2963
106
- def validate_ordervalidate_order109,3067
107
- def flexmock_verifyflexmock_verify121,3442
108
- def match_args(args)match_args129,3639
109
- def match_arg(expected, actual)match_arg138,3985
110
- def with(*args)with145,4214
111
- def with_no_argswith_no_args151,4348
112
- def with_any_argswith_any_args157,4481
113
- def and_return(*args, &block)and_return188,5490
114
- def and_return_undefinedand_return_undefined212,6207
115
- def and_yield(*yield_values)and_yield228,6776
116
- def and_raise(exception, *args)and_raise252,7529
117
- def and_throw(sym, value=nil)and_throw266,7894
118
- def zero_or_more_timeszero_or_more_times272,8069
119
- def times(limit)times279,8292
120
- def nevernever288,8639
121
- def onceonce295,8854
122
- def twicetwice302,9069
123
- def at_leastat_least314,9395
124
- def at_mostat_most327,9774
125
- def ordered(group_name=nil)ordered356,11043
126
- def globallyglobally368,11423
127
- def define_ordered(group_name, ordering)define_ordered374,11538
128
- def by_defaultby_default388,12036
129
- class CompositeExpectationCompositeExpectation399,12443
130
- def initializeinitialize402,12517
131
- def add(expectation)add407,12613
132
- def method_missing(sym, *args, &block)method_missing412,12754
133
- def order_numberorder_number423,13129
134
- def mockmock428,13239
135
- def should_receive(*args, &block)should_receive434,13403
136
- def to_sto_s439,13549
137
- class ExpectationRecorderExpectationRecorder453,14007
138
- def initializeinitialize456,14067
139
- def method_missing(sym, *args, &block)method_missing461,14178
140
- def apply(mock)apply469,14450
141
-
142
- lib/flexmock/expectation_director.rb,483
143
- class FlexMockFlexMock15,344
144
- class ExpectationDirectorExpectationDirector20,555
145
- def initialize(sym)initialize23,639
146
- def call(*args)call38,1187
147
- def <<(expectation)<<46,1440
148
- def find_expectation(*args) # :nodoc:find_expectation51,1564
149
- def flexmock_verify # :nodoc:flexmock_verify62,1938
150
- def defaultify_expectation(exp) # :nodoc:defaultify_expectation69,2149
151
- def find_expectation_in(expectations, *args)find_expectation_in81,2430
152
-
153
- lib/flexmock/mock_container.rb,944
154
- class FlexMockFlexMock16,380
155
- module MockContainerMockContainer26,781
156
- def flexmock_teardownflexmock_teardown31,965
157
- def flexmock_verifyflexmock_verify40,1208
158
- def flexmock_created_mocksflexmock_created_mocks49,1448
159
- def flexmock_closeflexmock_close55,1668
160
- def flexmock(*args)flexmock123,4876
161
- def flexmock_remember(mocking_object)flexmock_remember165,6148
162
- class MockContainerHelperMockContainerHelper181,6798
163
- def next_idnext_id185,6907
164
- def parse_should_args(mock, args, &block) # :nodoc:parse_should_args198,7380
165
- def add_model_methods(mock, model_class, id)add_model_methods216,7893
166
- def make_partial_proxy(container, obj, name, safe_mode)make_partial_proxy245,9111
167
- def build_demeter_chain(mock, arg, &block)build_demeter_chain291,11097
168
- def check_proper_mock(mock, method_name)check_proper_mock316,11944
169
- def check_method_names(names)check_method_names326,12348
91
+ class ModuleModule13,296
92
+ def flexmock_deprecate(*method_names)flexmock_deprecate14,309
93
+ class FlexMockFlexMock33,809
94
+ def mock_handle(sym, expected_count=nil, &block) # :nodoc:mock_handle40,1107
95
+ class PartialMockProxyPartialMockProxy47,1397
96
+ def any_instance(&block)any_instance53,1554
97
+ module OrderingOrdering59,1702
98
+
99
+ ,137
100
+ class FlexMockFlexMock14,320
101
+ class UsageError < ::RuntimeErrorUsageError17,388
102
+ class MockError < ::RuntimeErrorMockError20,431
103
+
104
+ lib/flexmock/expectation.rb,2006
105
+ class FlexMockFlexMock15,356
106
+ class ExpectationExpectation29,889
107
+ def initialize(mock, sym)initialize35,1035
108
+ def to_sto_s50,1397
109
+ def verify_call(*args)verify_call56,1579
110
+ def _return_value(args) # :nodoc:_return_value65,1799
111
+ def return_value(args)return_value70,1939
112
+ def perform_yielding(args)perform_yielding84,2267
113
+ def eligible?eligible?100,2852
114
+ def call_count_constrained?call_count_constrained?105,3001
115
+ def validate_ordervalidate_order110,3105
116
+ def flexmock_verifyflexmock_verify122,3480
117
+ def match_args(args)match_args130,3677
118
+ def with(*args)with135,3836
119
+ def with_no_argswith_no_args141,3970
120
+ def with_any_argswith_any_args147,4103
121
+ def and_return(*args, &block)and_return178,5112
122
+ def and_return_undefinedand_return_undefined202,5829
123
+ def and_yield(*yield_values)and_yield218,6398
124
+ def and_raise(exception, *args)and_raise242,7151
125
+ def and_throw(sym, value=nil)and_throw256,7516
126
+ def zero_or_more_timeszero_or_more_times262,7691
127
+ def times(limit)times269,7914
128
+ def nevernever278,8261
129
+ def onceonce285,8476
130
+ def twicetwice292,8691
131
+ def at_leastat_least304,9017
132
+ def at_mostat_most317,9396
133
+ def ordered(group_name=nil)ordered346,10665
134
+ def globallyglobally358,11045
135
+ def define_ordered(group_name, ordering)define_ordered364,11160
136
+ def by_defaultby_default378,11658
137
+ class CompositeExpectationCompositeExpectation389,12065
138
+ def initializeinitialize392,12139
139
+ def add(expectation)add397,12235
140
+ def method_missing(sym, *args, &block)method_missing402,12376
141
+ def order_numberorder_number413,12751
142
+ def mockmock418,12861
143
+ def should_receive(*args, &block)should_receive424,13025
144
+ def to_sto_s429,13171
145
+ class ExpectationRecorderExpectationRecorder443,13629
146
+ def initializeinitialize446,13689
147
+ def method_missing(sym, *args, &block)method_missing451,13800
148
+ def apply(mock)apply459,14072
149
+
150
+ ,483
151
+ class FlexMockFlexMock15,345
152
+ class ExpectationDirectorExpectationDirector20,556
153
+ def initialize(sym)initialize23,640
154
+ def call(*args)call38,1188
155
+ def <<(expectation)<<46,1441
156
+ def find_expectation(*args) # :nodoc:find_expectation51,1565
157
+ def flexmock_verify # :nodoc:flexmock_verify62,1939
158
+ def defaultify_expectation(exp) # :nodoc:defaultify_expectation69,2150
159
+ def find_expectation_in(expectations, *args)find_expectation_in81,2431
160
+
161
+ ,1013
162
+ class FlexMockFlexMock16,381
163
+ module MockContainerMockContainer26,782
164
+ def flexmock_teardownflexmock_teardown31,966
165
+ def flexmock_verifyflexmock_verify38,1146
166
+ def flexmock_created_mocksflexmock_created_mocks45,1302
167
+ def flexmock_closeflexmock_close51,1522
168
+ def flexmock(*args)flexmock119,4730
169
+ def flexmock_remember(mocking_object)flexmock_remember167,6192
170
+ def flexmock_test_has_failed?flexmock_test_has_failed?180,6663
171
+ class MockContainerHelperMockContainerHelper193,7175
172
+ def next_idnext_id197,7284
173
+ def parse_should_args(mock, args, &block) # :nodoc:parse_should_args210,7757
174
+ def add_model_methods(mock, model_class, id)add_model_methods228,8270
175
+ def make_partial_proxy(container, obj, name, safe_mode)make_partial_proxy257,9488
176
+ def build_demeter_chain(mock, arg, &block)build_demeter_chain303,11474
177
+ def check_proper_mock(mock, method_name)check_proper_mock328,12321
178
+ def check_method_names(names)check_method_names338,12730
170
179
 
171
180
  lib/flexmock/noop.rb,0
172
181
 
173
182
  lib/flexmock/ordering.rb,399
174
- class FlexMockFlexMock12,293
175
- module OrderingOrdering20,665
176
- def flexmock_allocate_orderflexmock_allocate_order23,732
177
- def flexmock_groupsflexmock_groups29,895
178
- def flexmock_current_orderflexmock_current_order34,1003
179
- def flexmock_current_order=(value)flexmock_current_order=39,1126
180
- def flexmock_validate_order(method_name, order_number)flexmock_validate_order43,1212
181
-
182
- lib/flexmock/partial_mock.rb,1375
183
- class FlexMockFlexMock14,318
184
- class PartialMockProxyPartialMockProxy26,948
185
- def initialize(obj, mock, safe_mode)initialize40,1285
186
- def flexmock_getflexmock_get56,1685
187
- def should_receive(*args)should_receive80,2625
188
- def add_mock_method(method_name)add_mock_method91,2903
189
- def new_instances(*allocators, &block)new_instances123,4119
190
- def invoke_original(method, args)invoke_original144,4920
191
- def flexmock_verifyflexmock_verify152,5214
192
- def flexmock_teardownflexmock_teardown157,5350
193
- def flexmock_containerflexmock_container169,5688
194
- def flexmock_container=(container)flexmock_container=175,5883
195
- def flexmock_expectations_for(method_name)flexmock_expectations_for179,5999
196
- def sclasssclass186,6160
197
- def singleton?(method_name)singleton?192,6301
198
- def hide_existing_method(method_name)hide_existing_method202,6763
199
- def stow_existing_definition(method_name)stow_existing_definition209,6980
200
- def create_alias_for_existing_method(method_name)create_alias_for_existing_method229,7697
201
- def define_proxy_method(method_name)define_proxy_method247,8216
202
- def restore_original_definition(method_name)restore_original_definition268,8964
203
- def remove_current_method(method_name)remove_current_method280,9328
204
- def detached?detached?285,9489
205
- def new_name(old_name)new_name290,9597
206
-
207
- lib/flexmock/rails/view_mocking.rb,665
183
+ class FlexMockFlexMock12,294
184
+ module OrderingOrdering20,666
185
+ def flexmock_allocate_orderflexmock_allocate_order23,733
186
+ def flexmock_groupsflexmock_groups29,896
187
+ def flexmock_current_orderflexmock_current_order34,1004
188
+ def flexmock_current_order=(value)flexmock_current_order=39,1127
189
+ def flexmock_validate_order(method_name, order_number)flexmock_validate_order43,1213
190
+
191
+ lib/flexmock/partial_mock.rb,1530
192
+ class FlexMockFlexMock14,319
193
+ class PartialMockProxyPartialMockProxy26,949
194
+ def initialize(obj, mock, safe_mode)initialize41,1321
195
+ def flexmock_getflexmock_get57,1721
196
+ def should_receive(*args)should_receive81,2661
197
+ def add_mock_method(method_name)add_mock_method92,2939
198
+ def new_instances(*allocators, &block)new_instances124,4155
199
+ def invoke_original(method, args)invoke_original146,5003
200
+ def flexmock_verifyflexmock_verify154,5297
201
+ def flexmock_teardownflexmock_teardown159,5433
202
+ def flexmock_containerflexmock_container171,5771
203
+ def flexmock_was_called_with?(*args)flexmock_was_called_with?176,5864
204
+ def flexmock_container=(container)flexmock_container=182,6087
205
+ def flexmock_expectations_for(method_name)flexmock_expectations_for186,6203
206
+ def check_allocate_method(allocate_method)check_allocate_method192,6323
207
+ def sclasssclass199,6586
208
+ def singleton?(method_name)singleton?205,6727
209
+ def hide_existing_method(method_name)hide_existing_method215,7189
210
+ def stow_existing_definition(method_name)stow_existing_definition222,7406
211
+ def create_alias_for_existing_method(method_name)create_alias_for_existing_method242,8123
212
+ def define_proxy_method(method_name)define_proxy_method260,8641
213
+ def restore_original_definition(method_name)restore_original_definition281,9399
214
+ def remove_current_method(method_name)remove_current_method293,9763
215
+ def detached?detached?298,9924
216
+ def new_name(old_name)new_name303,10032
217
+
218
+ pjw_94jc0000gn/T//tags.ewsA5I,665
208
219
  class FlexMockFlexMock3,20
209
220
  module MockContainerMockContainer4,35
210
221
  def rails_versionrails_version6,59
@@ -215,70 +226,102 @@ class FlexMockFlexMock3,20
215
226
  def should_render_view_22x(template_name)should_render_view_22x109,3813
216
227
  def should_render_view_23x(template_name)should_render_view_23x129,4575
217
228
 
218
- lib/flexmock/rails.rb,0
229
+ lib/flexmock/rails/view_mocking.rb,0
219
230
 
220
231
  lib/flexmock/recorder.rb,271
221
- class FlexMockFlexMock14,328
222
- class RecorderRecorder20,504
223
- def initialize(mock)initialize24,610
224
- def should_be_strict(is_strict=true)should_be_strict48,1542
225
- def strict?strict?53,1656
226
- def method_missing(sym, *args, &block)method_missing59,1786
232
+ class FlexMockFlexMock14,329
233
+ class RecorderRecorder20,505
234
+ def initialize(mock)initialize24,611
235
+ def should_be_strict(is_strict=true)should_be_strict48,1543
236
+ def strict?strict?53,1657
237
+ def method_missing(sym, *args, &block)method_missing59,1787
227
238
 
228
239
  lib/flexmock/rspec.rb,341
229
- class FlexMockFlexMock14,319
230
- class RSpecFrameworkAdapterRSpecFrameworkAdapter21,416
231
- def assert_block(msg, &block)assert_block22,446
232
- def assert_equal(a, b, msg=nil)assert_equal26,548
233
- class AssertionFailedError < StandardError; endAssertionFailedError31,711
234
- def assertion_failed_errorassertion_failed_error32,763
240
+ class FlexMockFlexMock16,321
241
+ class RSpecFrameworkAdapterRSpecFrameworkAdapter23,418
242
+ def assert_block(msg, &block)assert_block24,448
243
+ def assert_equal(a, b, msg=nil)assert_equal28,550
244
+ class AssertionFailedError < StandardError; endAssertionFailedError33,713
245
+ def assertion_failed_errorassertion_failed_error34,765
246
+
247
+ ,657
248
+ class FlexMockFlexMock3,35
249
+ module RSpecMatchersRSpecMatchers4,50
250
+ class HaveReceivedHaveReceived6,74
251
+ def initialize(method_name)initialize9,126
252
+ def matches?(spy)matches?17,295
253
+ def failure_message_for_shouldfailure_message_for_should25,555
254
+ def failure_message_for_should_notfailure_message_for_should_not29,673
255
+ def with(*args)with33,804
256
+ def with_a_blockwith_a_block38,871
257
+ def without_a_blockwithout_a_block43,946
258
+ def times(n)times48,1025
259
+ def nevernever53,1087
260
+ def onceonce57,1131
261
+ def twicetwice61,1174
262
+ def have_received(method_name)have_received66,1226
263
+
264
+ ,541
265
+ class FlexMockFlexMock1,0
266
+ module SpyDescribersSpyDescribers3,16
267
+ def describe_spy_expectation(spy, sym, args, options={})describe_spy_expectation4,41
268
+ def describe_spy_negative_expectation(spy, sym, args, options={})describe_spy_negative_expectation8,157
269
+ def describe(spy, sym, args, options, not_clause="")describe14,305
270
+ def times_description(times)times_description25,679
271
+ def block_description(needs_block)block_description40,928
272
+ def call_description(sym, args)call_description51,1135
235
273
 
236
274
  lib/flexmock/test_unit.rb,120
237
- module TestTest14,335
238
- module UnitUnit15,347
239
- class TestCaseTestCase16,361
240
- def teardownteardown25,676
275
+ module TestTest14,336
276
+ module UnitUnit15,348
277
+ class TestCaseTestCase16,362
278
+ def teardownteardown25,677
279
+
280
+ ,328
281
+ class FlexMockFlexMock3,35
282
+ module TestUnitAssertionsTestUnitAssertions4,50
283
+ def assert_spy_called(spy, method_name, *args)assert_spy_called7,115
284
+ def assert_spy_not_called(spy, method_name, *args)assert_spy_not_called11,232
285
+ def _assert_spy_called(negative, spy, method_name, *args)_assert_spy_called17,365
241
286
 
242
287
  lib/flexmock/test_unit_integration.rb,227
243
- class FlexMockFlexMock15,338
244
- module TestCaseTestCase29,895
245
- def teardownteardown35,1070
246
- class TestUnitFrameworkAdapterTestUnitFrameworkAdapter45,1277
247
- def assertion_failed_errorassertion_failed_error47,1345
248
-
249
- lib/flexmock/undefined.rb,288
250
- class FlexMockFlexMock12,293
251
- class UndefinedUndefined17,464
252
- def method_missing(sym, *args, &block)method_missing18,482
253
- def to_sto_s22,545
254
- def inspectinspect26,587
255
- def cloneclone30,623
256
- def coerce(other)coerce34,657
257
- def self.undefinedundefined43,862
288
+ class FlexMockFlexMock16,386
289
+ module TestCaseTestCase30,943
290
+ def teardownteardown37,1149
291
+ class TestUnitFrameworkAdapterTestUnitFrameworkAdapter47,1356
292
+ def assertion_failed_errorassertion_failed_error49,1424
293
+
294
+ z�Q�,318
295
+ class FlexMockFlexMock12,294
296
+ class UndefinedUndefined17,465
297
+ def method_missing(sym, *args, &block)method_missing18,483
298
+ def to_sto_s22,546
299
+ def inspectinspect26,588
300
+ def cloneclone30,624
301
+ def <=>(other)<=>34,658
302
+ def coerce(other)coerce38,697
303
+ def self.undefinedundefined47,902
258
304
 
259
305
  lib/flexmock/validators.rb,545
260
- class FlexMockFlexMock14,318
261
- class CountValidatorCountValidator19,454
262
- def initialize(expectation, limit)initialize20,477
263
- def eligible?(n)eligible?28,733
264
- class ExactCountValidator < CountValidatorExactCountValidator36,898
265
- def validate(n)validate39,1022
266
- class AtLeastCountValidator < CountValidatorAtLeastCountValidator48,1313
267
- def validate(n)validate51,1439
268
- def eligible?(n)eligible?61,1856
269
- class AtMostCountValidator < CountValidatorAtMostCountValidator69,2039
270
- def validate(n)validate71,2154
271
-
272
- lib/flexmock.rb,0
273
-
274
- test/redirect_error.rb,114
275
- class FlexMockFlexMock3,20
276
- module RedirectErrorRedirectError4,35
277
- def redirect_errorredirect_error5,58
278
-
279
- test/rspec_integration/integration_spec.rb,0
280
-
281
- test/test_aliasing.rb,521
306
+ class FlexMockFlexMock14,319
307
+ class CountValidatorCountValidator19,455
308
+ def initialize(expectation, limit)initialize20,478
309
+ def eligible?(n)eligible?28,734
310
+ class ExactCountValidator < CountValidatorExactCountValidator36,899
311
+ def validate(n)validate39,1023
312
+ class AtLeastCountValidator < CountValidatorAtLeastCountValidator48,1314
313
+ def validate(n)validate51,1440
314
+ def eligible?(n)eligible?61,1857
315
+ class AtMostCountValidator < CountValidatorAtMostCountValidator69,2040
316
+ def validate(n)validate71,2155
317
+
318
+ lib/flexmock/version.rb,58
319
+ class FlexMockFlexMock1,0
320
+ module VersionVersion2,15
321
+
322
+ ,0
323
+
324
+ ,521
282
325
  class FlexMockFlexMock5,48
283
326
  module StubsAndExpectsStubsAndExpects6,63
284
327
  def expects(*args)expects7,88
@@ -288,36 +331,53 @@ class FlexMockFlexMock5,48
288
331
  class AliasingTest < Test::Unit::TestCaseAliasingTest30,510
289
332
  def test_mockingtest_mocking33,582
290
333
  def test_once_mockingtest_once_mocking39,741
291
- def test_twice_mockingtest_twice_mocking43,837
292
- def test_stubbingtest_stubbing48,1004
293
- def test_partialtest_partial53,1127
294
-
295
- test/test_container_methods.rb,1111
296
- class TestFlexmockContainerMethods < Test::Unit::TestCaseTestFlexmockContainerMethods15,378
297
- def test_simple_mock_creationtest_simple_mock_creation18,466
298
- def test_mock_with_nametest_mock_with_name24,605
299
- def test_mock_with_symbol_nametest_mock_with_symbol_name31,802
300
- def test_mock_with_hashtest_mock_with_hash38,1005
301
- def test_mock_with_name_and_hashtest_mock_with_name_and_hash44,1148
302
- def test_mock_with_name_hash_and_blocktest_mock_with_name_hash_and_block53,1444
303
- def test_basic_stubtest_basic_stub61,1665
304
- def test_basic_stub_with_nametest_basic_stub_with_name68,1825
305
- def test_stub_with_quick_definitionstest_stub_with_quick_definitions76,2075
306
- def test_stub_with_name_quick_definitionstest_stub_with_name_quick_definitions82,2219
307
- def test_stubs_are_auto_verifiedtest_stubs_are_auto_verified91,2531
308
- def test_stubbing_a_stringtest_stubbing_a_string98,2721
309
- def test_multiple_stubs_work_with_same_partial_mock_proxytest_multiple_stubs_work_with_same_partial_mock_proxy104,2846
310
- def test_multiple_stubs_layer_behaviortest_multiple_stubs_layer_behavior111,3016
311
-
312
- test/test_default_framework_adapter.rb,473
313
- class TestFlexmockDefaultFrameworkAdapter < Test::Unit::TestCaseTestFlexmockDefaultFrameworkAdapter14,320
314
- def setupsetup15,385
315
- def test_assert_block_raises_exceptiontest_assert_block_raises_exception19,457
316
- def test_assert_block_doesnt_raise_exceptiontest_assert_block_doesnt_raise_exception25,649
317
- def test_assert_equal_doesnt_raise_exceptiontest_assert_equal_doesnt_raise_exception29,757
318
- def test_assert_equal_can_failtest_assert_equal_can_fail33,861
319
-
320
- test/test_demeter_mocking.rb,1568
334
+ def test_twice_mockingtest_twice_mocking43,833
335
+ def test_stubbingtest_stubbing48,1000
336
+ def test_partialtest_partial53,1123
337
+
338
+ test/assert_spy_called_test.rb,908
339
+ class AssertSpyCalledTest < Test::Unit::TestCaseAssertSpyCalledTest6,95
340
+ class FooBarFooBar9,174
341
+ def foofoo10,189
342
+ def barbar12,209
343
+ def setupsetup16,236
344
+ def spyspy21,298
345
+ def test_assert_detects_basic_calltest_assert_detects_basic_call25,324
346
+ def test_assert_detects_basic_call_with_argstest_assert_detects_basic_call_with_args30,412
347
+ def test_assert_rejects_incorrect_argstest_assert_rejects_incorrect_args35,521
348
+ def test_assert_detects_multiple_callstest_assert_detects_multiple_calls42,751
349
+ def test_assert_rejects_incorrect_typetest_assert_rejects_incorrect_type49,879
350
+ def test_assert_detects_blockstest_assert_detects_blocks57,1115
351
+ def test_assert_detects_any_argstest_assert_detects_any_args64,1297
352
+ def test_assert_rejects_bad_count_on_any_argstest_assert_rejects_bad_count_on_any_args72,1481
353
+ def assert_fails(message_pattern)assert_fails81,1731
354
+
355
+ test/container_methods_test.rb,1111
356
+ class TestFlexmockContainerMethods < Test::Unit::TestCaseTestFlexmockContainerMethods15,379
357
+ def test_simple_mock_creationtest_simple_mock_creation18,467
358
+ def test_mock_with_nametest_mock_with_name24,606
359
+ def test_mock_with_symbol_nametest_mock_with_symbol_name31,803
360
+ def test_mock_with_hashtest_mock_with_hash38,1006
361
+ def test_mock_with_name_and_hashtest_mock_with_name_and_hash44,1149
362
+ def test_mock_with_name_hash_and_blocktest_mock_with_name_hash_and_block53,1445
363
+ def test_basic_stubtest_basic_stub61,1666
364
+ def test_basic_stub_with_nametest_basic_stub_with_name68,1826
365
+ def test_stub_with_quick_definitionstest_stub_with_quick_definitions76,2076
366
+ def test_stub_with_name_quick_definitionstest_stub_with_name_quick_definitions82,2213
367
+ def test_stubs_are_auto_verifiedtest_stubs_are_auto_verified91,2525
368
+ def test_stubbing_a_stringtest_stubbing_a_string98,2710
369
+ def test_multiple_stubs_work_with_same_partial_mock_proxytest_multiple_stubs_work_with_same_partial_mock_proxy104,2828
370
+ def test_multiple_stubs_layer_behaviortest_multiple_stubs_layer_behavior111,2998
371
+
372
+ ,473
373
+ class TestFlexmockDefaultFrameworkAdapter < Test::Unit::TestCaseTestFlexmockDefaultFrameworkAdapter14,321
374
+ def setupsetup15,386
375
+ def test_assert_block_raises_exceptiontest_assert_block_raises_exception19,458
376
+ def test_assert_block_doesnt_raise_exceptiontest_assert_block_doesnt_raise_exception25,645
377
+ def test_assert_equal_doesnt_raise_exceptiontest_assert_equal_doesnt_raise_exception29,753
378
+ def test_assert_equal_can_failtest_assert_equal_can_fail33,857
379
+
380
+ ,1568
321
381
  class TestDemeterMocking < Test::Unit::TestCaseTestDemeterMocking5,48
322
382
  def test_demeter_mockingtest_demeter_mocking8,126
323
383
  def test_demeter_mocking_with_operatorstest_demeter_mocking_with_operators16,353
@@ -336,75 +396,75 @@ class TestDemeterMocking < Test::Unit::TestCaseTestDemeterMocking5,48
336
396
  def test_readme_example_2test_readme_example_2128,3967
337
397
  def test_readme_example_3test_readme_example_3134,4168
338
398
 
339
- test/test_deprecated_methods.rb,2237
340
- class TestFlexMock < Test::Unit::TestCaseTestFlexMock15,358
341
- def s(&block)s19,464
342
- def setupsetup23,514
343
- def test_handletest_handle27,562
344
- def test_handle_no_blocktest_handle_no_block34,706
345
- def test_called_with_blocktest_called_with_block40,836
346
- def test_return_valuetest_return_value47,1034
347
- def test_handle_missing_methodtest_handle_missing_method52,1139
348
- def test_ignore_missing_methodtest_ignore_missing_method60,1369
349
- def test_good_countstest_good_counts66,1500
350
- def test_bad_countstest_bad_counts74,1639
351
- def test_undetermined_countstest_undetermined_counts85,1846
352
- def test_zero_countstest_zero_counts94,1991
353
- def test_file_io_with_usetest_file_io_with_use103,2160
354
- def count_lines(stream)count_lines111,2364
355
- def test_usetest_use119,2478
356
- def test_failures_during_usetest_failures_during_use128,2625
357
- def test_sequential_valuestest_sequential_values138,2844
358
- def test_respond_to_returns_false_for_non_handled_methodstest_respond_to_returns_false_for_non_handled_methods147,3076
359
- def test_respond_to_returns_true_for_explicit_methodstest_respond_to_returns_true_for_explicit_methods151,3211
360
- def test_respond_to_returns_true_for_missing_methods_when_ignoring_missingtest_respond_to_returns_true_for_missing_methods_when_ignoring_missing156,3370
361
- def test_respond_to_returns_true_for_missing_methods_when_ignoring_missing_using_shouldtest_respond_to_returns_true_for_missing_methods_when_ignoring_missing_using_should161,3551
362
- def test_method_proc_raises_error_on_unknowntest_method_proc_raises_error_on_unknown166,3747
363
- def test_method_returns_callable_proctest_method_returns_callable_proc172,3865
364
- def test_method_returns_do_nothing_proc_for_missing_methodstest_method_returns_do_nothing_proc_for_missing_methods181,4121
365
- class TestDeprecatedOrderingMethods < Test::Unit::TestCaseTestDeprecatedOrderingMethods189,4348
366
- def test_deprecated_ordering_methodstest_deprecated_ordering_methods193,4471
367
- class TestAnyInstance < Test::Unit::TestCaseTestAnyInstance205,4867
368
- class DogDog209,4976
369
- def barkbark210,4988
370
- def test_any_instance_still_works_for_backwards_compatibilitytest_any_instance_still_works_for_backwards_compatibility215,5028
371
-
372
- test/test_examples_from_readme.rb,1206
373
- class TemperatureSamplerTemperatureSampler14,320
374
- def initialize(sensor)initialize15,345
375
- def average_tempaverage_temp19,398
376
- class TestTemperatureSampler < Test::Unit::TestCaseTestTemperatureSampler25,525
377
- def test_tempurature_samplertest_tempurature_sampler28,607
378
- class TestExamplesFromReadme < Test::Unit::TestCaseTestExamplesFromReadme37,886
379
- def test_simple_return_valuestest_simple_return_values40,968
380
- def test_returning_an_undefined_valuetest_returning_an_undefined_value46,1108
381
- def test_dbtest_db52,1246
382
- def test_query_and_updatetest_query_and_update61,1476
383
- def test_ordered_queriestest_ordered_queries70,1729
384
- def test_ordered_queries_in_record_modetest_ordered_queries_in_record_mode88,2326
385
- def test_build_xmltest_build_xml105,2858
386
- def known_good_way_to_build_xml(rec)known_good_way_to_build_xml114,3113
387
- def new_way_to_build_xml(rec)new_way_to_build_xml119,3183
388
- def test_multiple_getstest_multiple_gets123,3271
389
- def test_an_important_messagetest_an_important_message132,3516
390
- class QuoteServiceQuoteService141,3746
391
- class PortfolioPortfolio143,3773
392
- def valuevalue144,3791
393
- def test_portfolio_valuetest_portfolio_value149,3849
394
-
395
- test/test_extended_should_receive.rb,808
396
- module ExtendedShouldReceiveTestsExtendedShouldReceiveTests14,320
397
- def test_accepts_expectation_hashtest_accepts_expectation_hash15,354
398
- def test_accepts_list_of_methodstest_accepts_list_of_methods21,518
399
- def test_contraints_apply_to_all_expectationstest_contraints_apply_to_all_expectations28,676
400
- def test_count_contraints_apply_to_all_expectationstest_count_contraints_apply_to_all_expectations35,943
401
- def test_multiple_should_receives_are_allowedtest_multiple_should_receives_are_allowed41,1134
402
- class TestExtendedShouldReceiveOnFullMocks < Test::Unit::TestCaseTestExtendedShouldReceiveOnFullMocks49,1351
403
- def setupsetup53,1484
404
- class TestExtendedShouldReceiveOnPartialMockProxies < Test::Unit::TestCaseTestExtendedShouldReceiveOnPartialMockProxies60,1554
405
- def setupsetup64,1696
406
-
407
- test/test_flexmodel.rb,528
399
+ test/deprecated_methods_test.rb,2237
400
+ class TestFlexMock < Test::Unit::TestCaseTestFlexMock15,359
401
+ def s(&block)s19,465
402
+ def setupsetup23,515
403
+ def test_handletest_handle27,563
404
+ def test_handle_no_blocktest_handle_no_block34,707
405
+ def test_called_with_blocktest_called_with_block40,837
406
+ def test_return_valuetest_return_value47,1035
407
+ def test_handle_missing_methodtest_handle_missing_method52,1140
408
+ def test_ignore_missing_methodtest_ignore_missing_method60,1370
409
+ def test_good_countstest_good_counts66,1501
410
+ def test_bad_countstest_bad_counts74,1640
411
+ def test_undetermined_countstest_undetermined_counts85,1847
412
+ def test_zero_countstest_zero_counts94,1992
413
+ def test_file_io_with_usetest_file_io_with_use103,2161
414
+ def count_lines(stream)count_lines111,2358
415
+ def test_usetest_use119,2465
416
+ def test_failures_during_usetest_failures_during_use128,2612
417
+ def test_sequential_valuestest_sequential_values138,2831
418
+ def test_respond_to_returns_false_for_non_handled_methodstest_respond_to_returns_false_for_non_handled_methods147,3063
419
+ def test_respond_to_returns_true_for_explicit_methodstest_respond_to_returns_true_for_explicit_methods151,3198
420
+ def test_respond_to_returns_true_for_missing_methods_when_ignoring_missingtest_respond_to_returns_true_for_missing_methods_when_ignoring_missing156,3357
421
+ def test_respond_to_returns_true_for_missing_methods_when_ignoring_missing_using_shouldtest_respond_to_returns_true_for_missing_methods_when_ignoring_missing_using_should161,3538
422
+ def test_method_proc_raises_error_on_unknowntest_method_proc_raises_error_on_unknown166,3734
423
+ def test_method_returns_callable_proctest_method_returns_callable_proc172,3852
424
+ def test_method_returns_do_nothing_proc_for_missing_methodstest_method_returns_do_nothing_proc_for_missing_methods181,4108
425
+ class TestDeprecatedOrderingMethods < Test::Unit::TestCaseTestDeprecatedOrderingMethods189,4335
426
+ def test_deprecated_ordering_methodstest_deprecated_ordering_methods193,4458
427
+ class TestAnyInstance < Test::Unit::TestCaseTestAnyInstance205,4854
428
+ class DogDog209,4963
429
+ def barkbark210,4975
430
+ def test_any_instance_still_works_for_backwards_compatibilitytest_any_instance_still_works_for_backwards_compatibility215,5015
431
+
432
+ ,1206
433
+ class TemperatureSamplerTemperatureSampler14,321
434
+ def initialize(sensor)initialize15,346
435
+ def average_tempaverage_temp19,399
436
+ class TestTemperatureSampler < Test::Unit::TestCaseTestTemperatureSampler25,526
437
+ def test_tempurature_samplertest_tempurature_sampler28,608
438
+ class TestExamplesFromReadme < Test::Unit::TestCaseTestExamplesFromReadme37,887
439
+ def test_simple_return_valuestest_simple_return_values40,969
440
+ def test_returning_an_undefined_valuetest_returning_an_undefined_value46,1109
441
+ def test_dbtest_db52,1247
442
+ def test_query_and_updatetest_query_and_update61,1477
443
+ def test_ordered_queriestest_ordered_queries70,1730
444
+ def test_ordered_queries_in_record_modetest_ordered_queries_in_record_mode88,2327
445
+ def test_build_xmltest_build_xml105,2859
446
+ def known_good_way_to_build_xml(rec)known_good_way_to_build_xml114,3114
447
+ def new_way_to_build_xml(rec)new_way_to_build_xml119,3184
448
+ def test_multiple_getstest_multiple_gets123,3272
449
+ def test_an_important_messagetest_an_important_message132,3517
450
+ class QuoteServiceQuoteService141,3747
451
+ class PortfolioPortfolio143,3774
452
+ def valuevalue144,3792
453
+ def test_portfolio_valuetest_portfolio_value149,3850
454
+
455
+ test/extended_should_receive_test.rb,808
456
+ module ExtendedShouldReceiveTestsExtendedShouldReceiveTests14,321
457
+ def test_accepts_expectation_hashtest_accepts_expectation_hash15,355
458
+ def test_accepts_list_of_methodstest_accepts_list_of_methods21,519
459
+ def test_contraints_apply_to_all_expectationstest_contraints_apply_to_all_expectations28,677
460
+ def test_count_contraints_apply_to_all_expectationstest_count_contraints_apply_to_all_expectations35,944
461
+ def test_multiple_should_receives_are_allowedtest_multiple_should_receives_are_allowed41,1135
462
+ class TestExtendedShouldReceiveOnFullMocks < Test::Unit::TestCaseTestExtendedShouldReceiveOnFullMocks49,1352
463
+ def setupsetup53,1485
464
+ class TestExtendedShouldReceiveOnPartialMockProxies < Test::Unit::TestCaseTestExtendedShouldReceiveOnPartialMockProxies60,1555
465
+ def setupsetup64,1697
466
+
467
+ ,528
408
468
  class DummyModelDummyModel5,48
409
469
  class ChildModel < DummyModelChildModel8,70
410
470
  class TestFlexModel < Test::Unit::TestCaseTestFlexModel12,176
@@ -414,107 +474,108 @@ class TestFlexModel < Test::Unit::TestCaseTestFlexModel12,176
414
474
  def test_mock_models_can_have_quick_defstest_mock_models_can_have_quick_defs43,1048
415
475
  def test_mock_models_can_have_blockstest_mock_models_can_have_blocks48,1188
416
476
 
417
- test/test_naming.rb,816
418
- class TestNaming < Test::Unit::TestCaseTestNaming14,320
419
- def test_nametest_name17,390
420
- def test_name_in_no_handler_found_errortest_name_in_no_handler_found_error22,473
421
- def test_name_in_received_count_errortest_name_in_received_count_error31,689
422
- def test_naming_with_usetest_naming_with_use40,909
423
- def test_naming_with_multiple_mocks_in_usetest_naming_with_multiple_mocks_in_use46,1026
424
- def test_inspect_returns_reasonable_nametest_inspect_returns_reasonable_name53,1214
425
- def test_mock_can_override_inspecttest_mock_can_override_inspect60,1398
426
- class DummyDummy67,1601
427
- def inspectinspect68,1615
428
- def test_partial_mocks_use_original_inspecttest_partial_mocks_use_original_inspect73,1668
429
- def test_partial_mocks_can_override_inspecttest_partial_mocks_can_override_inspect79,1832
430
-
431
- test/test_new_instances.rb,2271
432
- class TestNewInstances < Test::Unit::TestCaseTestNewInstances14,320
433
- class DogDog18,430
434
- def barkbark19,442
435
- def wagwag22,475
436
- def self.makemake25,507
437
- class CatCat30,550
438
- def initialize(name, &block)initialize32,584
439
- class ConnectionConnection38,690
440
- def initialize(*args)initialize39,709
441
- def send(args)send42,777
442
- def post(args)post45,821
443
- def test_new_instances_allows_stubbing_of_existing_methodstest_new_instances_allows_stubbing_of_existing_methods50,872
444
- def test_new_instances_stubs_still_have_existing_methodstest_new_instances_stubs_still_have_existing_methods58,1093
445
- def test_new_instances_will_pass_args_to_newtest_new_instances_will_pass_args_to_new66,1308
446
- def test_new_gets_block_after_restubbingtest_new_gets_block_after_restubbing79,1714
447
- def test_new_instances_stub_verification_happens_on_teardowntest_new_instances_stub_verification_happens_on_teardown92,2035
448
- def test_new_instances_reports_error_on_non_classestest_new_instances_reports_error_on_non_classes102,2380
449
- def test_does_not_by_default_stub_objects_created_with_allocatetest_does_not_by_default_stub_objects_created_with_allocate112,2659
450
- def test_can_explicitly_stub_objects_created_with_allocatetest_can_explicitly_stub_objects_created_with_allocate120,2887
451
- def test_can_stub_objects_created_with_arbitrary_class_methodstest_can_stub_objects_created_with_arbitrary_class_methods128,3124
452
- def test_stubbing_arbitrary_class_methods_leaves_new_alonetest_stubbing_arbitrary_class_methods_leaves_new_alone135,3347
453
- def test_stubbing_new_and_allocate_doesnt_double_stub_objects_on_newtest_stubbing_new_and_allocate_doesnt_double_stub_objects_on_new142,3562
454
- def test_blocks_on_new_do_not_have_stubs_installedtest_blocks_on_new_do_not_have_stubs_installed155,4015
455
- def test_new_instances_accept_chained_expectationstest_new_instances_accept_chained_expectations169,4353
456
- def test_fancy_use_of_chained_should_receivedtest_fancy_use_of_chained_should_received177,4623
457
- def test_writable_accessorstest_writable_accessors182,4778
458
- def test_ordering_can_be_specifiedtest_ordering_can_be_specified188,4923
459
- def test_ordering_can_be_specified_in_groupstest_ordering_can_be_specified_in_groups196,5117
460
-
461
- test/test_partial_mock.rb,4962
462
- class TestStubbing < Test::Unit::TestCaseTestStubbing14,320
463
- class DogDog17,392
464
- def barkbark18,404
465
- def Dog.createcreate21,437
466
- class DogPlus < DogDogPlus26,486
467
- def should_receiveshould_receive27,508
468
- def new_instancesnew_instances30,557
469
- def by_defaultby_default33,602
470
- def test_stub_command_add_behavior_to_arbitrary_objectstest_stub_command_add_behavior_to_arbitrary_objects38,658
471
- def test_stub_command_can_configure_via_blocktest_stub_command_can_configure_via_block44,842
472
- def test_stubbed_methods_can_take_blockstest_stubbed_methods_can_take_blocks52,1039
473
- def test_multiple_stubs_on_the_same_object_reuse_the_same_partial_mocktest_multiple_stubs_on_the_same_object_reuse_the_same_partial_mock59,1264
474
- def test_multiple_methods_can_be_stubbedtest_multiple_methods_can_be_stubbed64,1411
475
- def test_original_behavior_can_be_restoredtest_original_behavior_can_be_restored72,1663
476
- def test_original_missing_behavior_can_be_restoredtest_original_missing_behavior_can_be_restored82,1998
477
- def test_multiple_stubs_on_single_method_can_be_restored_missing_methodtest_multiple_stubs_on_single_method_can_be_restored_missing_method91,2277
478
- def test_original_behavior_is_restored_when_multiple_methods_are_mockedtest_original_behavior_is_restored_when_multiple_methods_are_mocked102,2686
479
- def test_original_behavior_is_restored_on_class_objectstest_original_behavior_is_restored_on_class_objects111,3015
480
- def test_original_behavior_is_restored_on_singleton_methodstest_original_behavior_is_restored_on_singleton_methods118,3262
481
- def obj.hi() :hello endhi120,3345
482
- def test_original_behavior_is_restored_on_singleton_methods_with_multiple_stubstest_original_behavior_is_restored_on_singleton_methods_with_multiple_stubs128,3541
483
- def obj.hi(n) "hello#{n}" endhi130,3644
484
- def test_original_behavior_is_restored_on_nonsingleton_methods_with_multiple_stubstest_original_behavior_is_restored_on_nonsingleton_methods_with_multiple_stubs140,3965
485
- def test_stubbing_file_shouldnt_break_writingtest_stubbing_file_shouldnt_break_writing156,4459
486
- def test_original_behavior_is_restored_even_when_errorstest_original_behavior_is_restored_even_when_errors172,4898
487
- def m.flexmock_verify() endflexmock_verify180,5217
488
- def test_not_calling_stubbed_method_is_an_errortest_not_calling_stubbed_method_is_an_error183,5256
489
- def test_mock_is_verified_when_the_stub_is_verifiedtest_mock_is_verified_when_the_stub_is_verified192,5474
490
- def test_stub_can_have_explicit_nametest_stub_can_have_explicit_name201,5731
491
- def test_unamed_stub_will_use_default_naming_conventiontest_unamed_stub_will_use_default_naming_convention207,5910
492
- def test_partials_can_be_defined_in_a_blocktest_partials_can_be_defined_in_a_block213,6106
493
- def test_partials_defining_block_return_real_obj_not_proxytest_partials_defining_block_return_real_obj_not_proxy221,6293
494
- def test_partial_mocks_always_return_domain_objecttest_partial_mocks_always_return_domain_object228,6487
495
- def test_domain_objects_do_not_have_mock_methodstest_domain_objects_do_not_have_mock_methods239,6767
496
- def test_partial_mocks_have_mock_methodstest_partial_mocks_have_mock_methods246,6959
497
- def test_partial_mocks_do_not_have_mock_methods_after_teardowntest_partial_mocks_do_not_have_mock_methods_after_teardown254,7155
498
- def test_partial_mocks_with_mock_method_singleton_colision_have_original_defs_restoredtest_partial_mocks_with_mock_method_singleton_colision_have_original_defs_restored263,7405
499
- def dog.mock() :original endmock265,7512
500
- class MockColisionMockColision271,7633
501
- def mockmock272,7654
502
- 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_restored277,7698
503
- def test_safe_partial_mocks_do_not_support_mock_methodstest_safe_partial_mocks_do_not_support_mock_methods284,7902
504
- def test_safe_partial_mocks_require_blocktest_safe_partial_mocks_require_block292,8130
505
- def test_safe_partial_mocks_are_actually_mockedtest_safe_partial_mocks_are_actually_mocked297,8268
506
- def test_should_receive_does_not_override_preexisting_deftest_should_receive_does_not_override_preexisting_def302,8438
507
- def test_should_receive_does_override_should_receive_preexisting_deftest_should_receive_does_override_should_receive_preexisting_def308,8638
508
- class LiarLiar313,8822
509
- def respond_to?(method_name)respond_to?314,8835
510
- def test_liar_actually_liestest_liar_actually_lies324,9004
511
- 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_there330,9156
512
- class ValueObjectValueObject341,9585
513
- def initialize(val)initialize344,9627
514
- def ==(other)==348,9677
515
- def test_partial_mocks_in_the_presense_of_equal_definitiontest_partial_mocks_in_the_presense_of_equal_definition353,9734
516
-
517
- test/test_rails_view_stub.rb,1492
477
+ test/naming_test.rb,816
478
+ class TestNaming < Test::Unit::TestCaseTestNaming14,321
479
+ def test_nametest_name17,391
480
+ def test_name_in_no_handler_found_errortest_name_in_no_handler_found_error22,474
481
+ def test_name_in_received_count_errortest_name_in_received_count_error31,690
482
+ def test_naming_with_usetest_naming_with_use40,910
483
+ def test_naming_with_multiple_mocks_in_usetest_naming_with_multiple_mocks_in_use46,1027
484
+ def test_inspect_returns_reasonable_nametest_inspect_returns_reasonable_name53,1215
485
+ def test_mock_can_override_inspecttest_mock_can_override_inspect60,1399
486
+ class DummyDummy67,1602
487
+ def inspectinspect68,1616
488
+ def test_partial_mocks_use_original_inspecttest_partial_mocks_use_original_inspect73,1669
489
+ def test_partial_mocks_can_override_inspecttest_partial_mocks_can_override_inspect79,1833
490
+
491
+ test/new_instances_test.rb,2428
492
+ class TestNewInstances < Test::Unit::TestCaseTestNewInstances14,321
493
+ class DogDog18,431
494
+ def barkbark19,443
495
+ def wagwag22,476
496
+ def self.makemake25,508
497
+ class CatCat30,551
498
+ def initialize(name, &block)initialize32,585
499
+ class ConnectionConnection38,691
500
+ def initialize(*args)initialize39,710
501
+ def send(args)send42,778
502
+ def post(args)post45,822
503
+ def test_new_instances_allows_stubbing_of_existing_methodstest_new_instances_allows_stubbing_of_existing_methods50,873
504
+ def test_new_instances_stubs_still_have_existing_methodstest_new_instances_stubs_still_have_existing_methods58,1094
505
+ def test_new_instances_will_pass_args_to_newtest_new_instances_will_pass_args_to_new66,1309
506
+ def test_new_gets_block_after_restubbingtest_new_gets_block_after_restubbing79,1715
507
+ def test_new_instances_stub_verification_happens_on_teardowntest_new_instances_stub_verification_happens_on_teardown92,2036
508
+ def test_new_instances_reports_error_on_non_classestest_new_instances_reports_error_on_non_classes102,2374
509
+ def test_does_not_by_default_stub_objects_created_with_allocatetest_does_not_by_default_stub_objects_created_with_allocate112,2653
510
+ def test_explicitly_mocking_allocation_in_new_instances_fails_in_ruby_19test_explicitly_mocking_allocation_in_new_instances_fails_in_ruby_19121,2908
511
+ def test_can_explicitly_stub_objects_created_with_allocatetest_can_explicitly_stub_objects_created_with_allocate129,3178
512
+ def test_can_stub_objects_created_with_arbitrary_class_methodstest_can_stub_objects_created_with_arbitrary_class_methods138,3435
513
+ def test_stubbing_arbitrary_class_methods_leaves_new_alonetest_stubbing_arbitrary_class_methods_leaves_new_alone145,3658
514
+ def test_stubbing_new_and_allocate_doesnt_double_stub_objects_on_newtest_stubbing_new_and_allocate_doesnt_double_stub_objects_on_new152,3873
515
+ def test_blocks_on_new_do_not_have_stubs_installedtest_blocks_on_new_do_not_have_stubs_installed165,4326
516
+ def test_new_instances_accept_chained_expectationstest_new_instances_accept_chained_expectations179,4664
517
+ def test_fancy_use_of_chained_should_receivedtest_fancy_use_of_chained_should_received187,4934
518
+ def test_writable_accessorstest_writable_accessors192,5089
519
+ def test_ordering_can_be_specifiedtest_ordering_can_be_specified198,5234
520
+ def test_ordering_can_be_specified_in_groupstest_ordering_can_be_specified_in_groups206,5428
521
+
522
+ test/partial_mock_test.rb,4962
523
+ class TestStubbing < Test::Unit::TestCaseTestStubbing14,321
524
+ class DogDog17,393
525
+ def barkbark18,405
526
+ def Dog.createcreate21,438
527
+ class DogPlus < DogDogPlus26,487
528
+ def should_receiveshould_receive27,509
529
+ def new_instancesnew_instances30,558
530
+ def by_defaultby_default33,603
531
+ def test_stub_command_add_behavior_to_arbitrary_objectstest_stub_command_add_behavior_to_arbitrary_objects38,659
532
+ def test_stub_command_can_configure_via_blocktest_stub_command_can_configure_via_block44,843
533
+ def test_stubbed_methods_can_take_blockstest_stubbed_methods_can_take_blocks52,1040
534
+ def test_multiple_stubs_on_the_same_object_reuse_the_same_partial_mocktest_multiple_stubs_on_the_same_object_reuse_the_same_partial_mock59,1265
535
+ def test_multiple_methods_can_be_stubbedtest_multiple_methods_can_be_stubbed64,1412
536
+ def test_original_behavior_can_be_restoredtest_original_behavior_can_be_restored72,1664
537
+ def test_original_missing_behavior_can_be_restoredtest_original_missing_behavior_can_be_restored82,1999
538
+ def test_multiple_stubs_on_single_method_can_be_restored_missing_methodtest_multiple_stubs_on_single_method_can_be_restored_missing_method91,2278
539
+ def test_original_behavior_is_restored_when_multiple_methods_are_mockedtest_original_behavior_is_restored_when_multiple_methods_are_mocked102,2687
540
+ def test_original_behavior_is_restored_on_class_objectstest_original_behavior_is_restored_on_class_objects111,3016
541
+ def test_original_behavior_is_restored_on_singleton_methodstest_original_behavior_is_restored_on_singleton_methods118,3263
542
+ def obj.hi() :hello endhi120,3346
543
+ def test_original_behavior_is_restored_on_singleton_methods_with_multiple_stubstest_original_behavior_is_restored_on_singleton_methods_with_multiple_stubs128,3542
544
+ def obj.hi(n) "hello#{n}" endhi130,3645
545
+ def test_original_behavior_is_restored_on_nonsingleton_methods_with_multiple_stubstest_original_behavior_is_restored_on_nonsingleton_methods_with_multiple_stubs140,3966
546
+ def test_stubbing_file_shouldnt_break_writingtest_stubbing_file_shouldnt_break_writing156,4460
547
+ def test_original_behavior_is_restored_even_when_errorstest_original_behavior_is_restored_even_when_errors172,4899
548
+ def m.flexmock_verify() endflexmock_verify184,5276
549
+ def test_not_calling_stubbed_method_is_an_errortest_not_calling_stubbed_method_is_an_error187,5315
550
+ def test_mock_is_verified_when_the_stub_is_verifiedtest_mock_is_verified_when_the_stub_is_verified196,5533
551
+ def test_stub_can_have_explicit_nametest_stub_can_have_explicit_name205,5790
552
+ def test_unamed_stub_will_use_default_naming_conventiontest_unamed_stub_will_use_default_naming_convention211,5969
553
+ def test_partials_can_be_defined_in_a_blocktest_partials_can_be_defined_in_a_block217,6165
554
+ def test_partials_defining_block_return_real_obj_not_proxytest_partials_defining_block_return_real_obj_not_proxy225,6352
555
+ def test_partial_mocks_always_return_domain_objecttest_partial_mocks_always_return_domain_object232,6546
556
+ def test_domain_objects_do_not_have_mock_methodstest_domain_objects_do_not_have_mock_methods243,6826
557
+ def test_partial_mocks_have_mock_methodstest_partial_mocks_have_mock_methods250,7018
558
+ def test_partial_mocks_do_not_have_mock_methods_after_teardowntest_partial_mocks_do_not_have_mock_methods_after_teardown258,7214
559
+ def test_partial_mocks_with_mock_method_singleton_colision_have_original_defs_restoredtest_partial_mocks_with_mock_method_singleton_colision_have_original_defs_restored267,7464
560
+ def dog.mock() :original endmock269,7571
561
+ class MockColisionMockColision275,7692
562
+ def mockmock276,7713
563
+ 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_restored281,7757
564
+ def test_safe_partial_mocks_do_not_support_mock_methodstest_safe_partial_mocks_do_not_support_mock_methods288,7961
565
+ def test_safe_partial_mocks_require_blocktest_safe_partial_mocks_require_block296,8189
566
+ def test_safe_partial_mocks_are_actually_mockedtest_safe_partial_mocks_are_actually_mocked301,8322
567
+ def test_should_receive_does_not_override_preexisting_deftest_should_receive_does_not_override_preexisting_def306,8492
568
+ def test_should_receive_does_override_should_receive_preexisting_deftest_should_receive_does_override_should_receive_preexisting_def312,8692
569
+ class LiarLiar317,8876
570
+ def respond_to?(method_name)respond_to?318,8889
571
+ def test_liar_actually_liestest_liar_actually_lies328,9058
572
+ 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_there334,9210
573
+ class ValueObjectValueObject345,9639
574
+ def initialize(val)initialize348,9681
575
+ def ==(other)==352,9731
576
+ def test_partial_mocks_in_the_presense_of_equal_definitiontest_partial_mocks_in_the_presense_of_equal_definition357,9788
577
+
578
+ test/rails_view_stub_test.rb,1492
518
579
  module ViewTestsViewTests6,86
519
580
  def test_view_mocks_as_stubtest_view_mocks_as_stub7,103
520
581
  def test_fails_if_no_rendertest_fails_if_no_render12,197
@@ -540,65 +601,242 @@ class TestRailsVersion < Test::Unit::TestCaseTestRailsVersion133,3107
540
601
  module ActionViewActionView142,3280
541
602
  class BaseBase143,3298
542
603
 
543
- test/test_record_mode.rb,1339
544
- class TestRecordMode < Test::Unit::TestCaseTestRecordMode14,320
545
- def test_recording_mode_workstest_recording_mode_works17,394
546
- def test_arguments_are_passed_to_recording_mode_blocktest_arguments_are_passed_to_recording_mode_block25,568
547
- def test_recording_mode_handles_multiple_returnstest_recording_mode_handles_multiple_returns36,832
548
- def test_recording_mode_does_not_specify_ordertest_recording_mode_does_not_specify_order50,1242
549
- def test_recording_mode_gets_block_args_tootest_recording_mode_gets_block_args_too61,1477
550
- def test_recording_mode_should_validate_args_with_equalstest_recording_mode_should_validate_args_with_equals73,1747
551
- def test_recording_mode_should_allow_arg_contraint_validationtest_recording_mode_should_allow_arg_contraint_validation84,1971
552
- def test_recording_mode_should_handle_multiplicity_contraintstest_recording_mode_should_handle_multiplicity_contraints95,2200
553
- def test_strict_record_mode_requires_exact_argument_matchestest_strict_record_mode_requires_exact_argument_matches107,2455
554
- def test_strict_record_mode_requires_exact_orderingtest_strict_record_mode_requires_exact_ordering119,2723
555
- def test_strict_record_mode_requires_oncetest_strict_record_mode_requires_once133,3014
556
- def test_strict_record_mode_can_not_failtest_strict_record_mode_can_not_fail146,3276
557
-
558
- test/test_samples.rb,2164
559
- class TestSamples < Test::Unit::TestCaseTestSamples16,346
560
- def test_file_iotest_file_io24,716
561
- def count_lines(file)count_lines32,967
562
- class TestUndefined < Test::Unit::TestCaseTestUndefined42,1060
563
- def test_undefined_valuestest_undefined_values45,1133
564
- class TestSimple < Test::Unit::TestCaseTestSimple54,1319
565
- def test_simple_mocktest_simple_mock57,1389
566
- class TestDog < Test::Unit::TestCaseTestDog64,1524
567
- def test_dog_wagstest_dog_wags67,1591
568
- class WooferWoofer73,1702
569
- class DogDog76,1720
570
- def initializeinitialize77,1730
571
- def barkbark80,1778
572
- def wagwag83,1812
573
- class TestDogBarking < Test::Unit::TestCaseTestDogBarking88,1844
574
- def setupsetup93,2006
575
- def test_dogtest_dog98,2079
576
- class TestDogBarkingWithNewInstances < Test::Unit::TestCaseTestDogBarkingWithNewInstances104,2210
577
- def setupsetup109,2374
578
- def test_dogtest_dog113,2459
579
- class TestDefaults < Test::Unit::TestCaseTestDefaults119,2593
580
- def setupsetup122,2665
581
- def test_something_where_bark_must_be_called_oncetest_something_where_bark_must_be_called_once127,2792
582
- class TestDemeter < Test::Unit::TestCaseTestDemeter135,2994
583
- def test_manual_mockingtest_manual_mocking137,3064
584
- def test_demetertest_demeter150,3498
585
- class TestDb < Test::Unit::TestCaseTestDb160,3713
586
- def test_dbtest_db163,3779
587
- class TestDb < Test::Unit::TestCaseTestDb174,3984
588
- def test_query_and_updatetest_query_and_update177,4050
589
- def test_ordered_queriestest_ordered_queries188,4327
590
- def test_ordered_queries_in_record_modetest_ordered_queries_in_record_mode206,4867
591
- def known_good_way_to_build_xml(builder)known_good_way_to_build_xml223,5342
592
- def new_way_to_build_xml(builder)new_way_to_build_xml227,5409
593
- def test_build_xmltest_build_xml231,5493
594
- class TestMoreSamples < Test::Unit::TestCaseTestMoreSamples242,5753
595
- def test_multiple_getstest_multiple_gets245,5828
596
- def test_an_important_messagetest_an_important_message254,6073
597
- class QuoteServiceQuoteService263,6334
598
- class PortfolioPortfolio266,6362
599
- def initializeinitialize267,6380
600
- def valuevalue270,6447
601
- def test_portfolio_valuetest_portfolio_value275,6503
604
+ test/record_mode_test.rb,1339
605
+ class TestRecordMode < Test::Unit::TestCaseTestRecordMode14,321
606
+ def test_recording_mode_workstest_recording_mode_works17,395
607
+ def test_arguments_are_passed_to_recording_mode_blocktest_arguments_are_passed_to_recording_mode_block25,569
608
+ def test_recording_mode_handles_multiple_returnstest_recording_mode_handles_multiple_returns36,833
609
+ def test_recording_mode_does_not_specify_ordertest_recording_mode_does_not_specify_order50,1243
610
+ def test_recording_mode_gets_block_args_tootest_recording_mode_gets_block_args_too61,1478
611
+ def test_recording_mode_should_validate_args_with_equalstest_recording_mode_should_validate_args_with_equals73,1748
612
+ def test_recording_mode_should_allow_arg_contraint_validationtest_recording_mode_should_allow_arg_contraint_validation84,1972
613
+ def test_recording_mode_should_handle_multiplicity_contraintstest_recording_mode_should_handle_multiplicity_contraints95,2201
614
+ def test_strict_record_mode_requires_exact_argument_matchestest_strict_record_mode_requires_exact_argument_matches107,2456
615
+ def test_strict_record_mode_requires_exact_orderingtest_strict_record_mode_requires_exact_ordering119,2724
616
+ def test_strict_record_mode_requires_oncetest_strict_record_mode_requires_once133,3015
617
+ def test_strict_record_mode_can_not_failtest_strict_record_mode_can_not_fail146,3277
618
+
619
+ test/redirect_error.rb,114
620
+ class FlexMockFlexMock3,20
621
+ module RedirectErrorRedirectError4,35
622
+ def redirect_errorredirect_error5,58
623
+
624
+ ,0
625
+
626
+ test/rspec_integration/spy_example_spec.rb,134
627
+ class DogDog8,106
628
+ def wags(arg)wags9,118
629
+ def barksbarks13,179
630
+ def should_fail(message_pattern)should_fail134,3176
631
+
632
+ ,2164
633
+ class TestSamples < Test::Unit::TestCaseTestSamples16,347
634
+ def test_file_iotest_file_io24,717
635
+ def count_lines(file)count_lines32,968
636
+ class TestUndefined < Test::Unit::TestCaseTestUndefined42,1061
637
+ def test_undefined_valuestest_undefined_values45,1134
638
+ class TestSimple < Test::Unit::TestCaseTestSimple54,1320
639
+ def test_simple_mocktest_simple_mock57,1390
640
+ class TestDog < Test::Unit::TestCaseTestDog64,1525
641
+ def test_dog_wagstest_dog_wags67,1592
642
+ class WooferWoofer73,1703
643
+ class DogDog76,1721
644
+ def initializeinitialize77,1731
645
+ def barkbark80,1779
646
+ def wagwag83,1813
647
+ class TestDogBarking < Test::Unit::TestCaseTestDogBarking88,1845
648
+ def setupsetup93,2007
649
+ def test_dogtest_dog98,2080
650
+ class TestDogBarkingWithNewInstances < Test::Unit::TestCaseTestDogBarkingWithNewInstances104,2211
651
+ def setupsetup109,2375
652
+ def test_dogtest_dog113,2460
653
+ class TestDefaults < Test::Unit::TestCaseTestDefaults119,2594
654
+ def setupsetup122,2666
655
+ def test_something_where_bark_must_be_called_oncetest_something_where_bark_must_be_called_once127,2793
656
+ class TestDemeter < Test::Unit::TestCaseTestDemeter135,2995
657
+ def test_manual_mockingtest_manual_mocking137,3065
658
+ def test_demetertest_demeter150,3499
659
+ class TestDb < Test::Unit::TestCaseTestDb160,3714
660
+ def test_dbtest_db163,3780
661
+ class TestDb < Test::Unit::TestCaseTestDb174,3985
662
+ def test_query_and_updatetest_query_and_update177,4051
663
+ def test_ordered_queriestest_ordered_queries188,4328
664
+ def test_ordered_queries_in_record_modetest_ordered_queries_in_record_mode206,4868
665
+ def known_good_way_to_build_xml(builder)known_good_way_to_build_xml223,5343
666
+ def new_way_to_build_xml(builder)new_way_to_build_xml227,5410
667
+ def test_build_xmltest_build_xml231,5494
668
+ class TestMoreSamples < Test::Unit::TestCaseTestMoreSamples242,5754
669
+ def test_multiple_getstest_multiple_gets245,5829
670
+ def test_an_important_messagetest_an_important_message254,6074
671
+ class QuoteServiceQuoteService263,6335
672
+ class PortfolioPortfolio266,6363
673
+ def initializeinitialize267,6381
674
+ def valuevalue270,6448
675
+ def test_portfolio_valuetest_portfolio_value275,6504
676
+
677
+ pjw_94jc0000gn/T//tags.bwcxoa,1266
678
+ class TestShouldIgnoreMissing < Test::Unit::TestCaseTestShouldIgnoreMissing14,321
679
+ def setupsetup17,404
680
+ def test_mocks_do_not_respond_to_undefined_methodstest_mocks_do_not_respond_to_undefined_methods21,452
681
+ def test_mocks_do_respond_to_defined_methodstest_mocks_do_respond_to_defined_methods25,556
682
+ def test_mocks_do_respond_to_any_method_when_ignoring_missingtest_mocks_do_respond_to_any_method_when_ignoring_missing30,696
683
+ def test_should_ignore_missing_returns_mocktest_should_ignore_missing_returns_mock35,842
684
+ def test_ignored_methods_return_undefinedtest_ignored_methods_return_undefined40,967
685
+ def test_undefined_mocking_with_argumentstest_undefined_mocking_with_arguments46,1141
686
+ def test_method_chains_with_undefined_are_self_preservingtest_method_chains_with_undefined_are_self_preserving51,1289
687
+ def test_method_proc_raises_error_on_unknowntest_method_proc_raises_error_on_unknown56,1454
688
+ def test_method_returns_callable_proctest_method_returns_callable_proc62,1578
689
+ def test_not_calling_method_proc_will_fail_count_constraintstest_not_calling_method_proc_will_fail_count_constraints69,1762
690
+ def test_method_returns_do_nothing_proc_for_missing_methodstest_method_returns_do_nothing_proc_for_missing_methods78,2024
691
+
692
+ ,11020
693
+ def mock_top_level_functionmock_top_level_function14,321
694
+ module KernelKernel18,362
695
+ def mock_kernel_functionmock_kernel_function19,376
696
+ class CatCat25,442
697
+ def purrpurr26,452
698
+ def meowmeow28,469
699
+ class TestFlexMockShoulds < Test::Unit::TestCaseTestFlexMockShoulds32,491
700
+ def test_defaultstest_defaults43,996
701
+ def test_returns_with_valuetest_returns_with_value52,1164
702
+ def test_returns_with_multiple_valuestest_returns_with_multiple_values60,1331
703
+ def test_multiple_returnstest_multiple_returns71,1591
704
+ def test_returns_with_blocktest_returns_with_block82,1851
705
+ def test_block_example_from_readmetest_block_example_from_readme91,2054
706
+ def test_return_with_and_without_block_interleavedtest_return_with_and_without_block_interleaved101,2350
707
+ def test_and_returns_aliastest_and_returns_alias111,2630
708
+ def test_and_return_undefinedtest_and_return_undefined118,2767
709
+ def test_and_yield_will_continue_to_yield_the_same_valuetest_and_yield_will_continue_to_yield_the_same_value128,3116
710
+ def test_and_yield_with_multiple_values_yields_the_valuestest_and_yield_with_multiple_values_yields_the_values136,3362
711
+ def test_multiple_yields_are_done_sequentiallytest_multiple_yields_are_done_sequentially143,3572
712
+ def test_failure_if_no_block_giventest_failure_if_no_block_given152,3844
713
+ def test_failure_different_return_value_than_yield_returntest_failure_different_return_value_than_yield_return159,4027
714
+ def test_multiple_yieldstest_multiple_yields168,4313
715
+ def test_multiple_yields_will_yield_the_last_value_settest_multiple_yields_will_yield_the_last_value_set176,4551
716
+ def test_yielding_then_not_yielding_and_then_yielding_againtest_yielding_then_not_yielding_and_then_yielding_again187,4928
717
+ def test_yields_syntaxtest_yields_syntax198,5275
718
+ class MyError < RuntimeErrorMyError205,5420
719
+ def test_and_raises_with_exception_class_throws_exceptiontest_and_raises_with_exception_class_throws_exception208,5458
720
+ def test_and_raises_with_arguments_throws_exception_made_with_argstest_and_raises_with_arguments_throws_exception_made_with_args217,5667
721
+ def test_and_raises_with_a_specific_exception_throws_the_exceptiontest_and_raises_with_a_specific_exception_throws_the_exception227,5948
722
+ def test_raises_is_an_alias_for_and_raisetest_raises_is_an_alias_for_and_raise238,6218
723
+ def test_multiple_and_raise_clauses_will_be_done_sequentiallytest_multiple_and_raise_clauses_will_be_done_sequentially247,6418
724
+ def test_and_throw_will_throw_a_symboltest_and_throw_will_throw_a_symbol259,6816
725
+ def test_and_throw_with_expression_will_throwtest_and_throw_with_expression_will_throw270,7059
726
+ def test_throws_is_an_alias_for_and_throwtest_throws_is_an_alias_for_and_throw281,7341
727
+ def test_multiple_throws_will_be_done_sequentiallytest_multiple_throws_will_be_done_sequentially292,7616
728
+ def test_multiple_expectationstest_multiple_expectations304,7946
729
+ def test_with_no_args_with_no_argstest_with_no_args_with_no_args314,8177
730
+ def test_with_no_args_but_with_argstest_with_no_args_but_with_args321,8305
731
+ def test_with_any_argstest_with_any_args330,8499
732
+ def test_with_any_single_arg_matchingtest_with_any_single_arg_matching340,8677
733
+ def test_with_any_single_arg_nonmatchingtest_with_any_single_arg_nonmatching348,8870
734
+ def test_with_equal_arg_matchingtest_with_equal_arg_matching358,9105
735
+ def test_with_ducktype_arg_matchingtest_with_ducktype_arg_matching365,9268
736
+ def test_with_ducktype_arg_matching_no_matchtest_with_ducktype_arg_matching_no_match372,9447
737
+ def test_with_hash_matchingtest_with_hash_matching381,9671
738
+ def test_with_hash_non_matchingtest_with_hash_non_matching388,9859
739
+ def test_with_equal_arg_nonmatchingtest_with_equal_arg_nonmatching397,10079
740
+ def test_with_arbitrary_arg_matchingtest_with_arbitrary_arg_matching406,10316
741
+ def test_args_matching_with_regextest_args_matching_with_regex421,10736
742
+ def test_arg_matching_with_regex_matching_non_stringtest_arg_matching_with_regex_matching_non_string433,11057
743
+ def test_arg_matching_with_classtest_arg_matching_with_class440,11234
744
+ def test_arg_matching_with_no_matchtest_arg_matching_with_no_match451,11518
745
+ def test_arg_matching_with_string_doesnt_over_matchtest_arg_matching_with_string_doesnt_over_match460,11731
746
+ def test_block_arg_given_to_no_argstest_block_arg_given_to_no_args469,11950
747
+ def test_block_arg_given_to_matching_proctest_block_arg_given_to_matching_proc478,12154
748
+ def test_arg_matching_precedence_when_best_firsttest_arg_matching_precedence_when_best_first489,12439
749
+ def test_arg_matching_precedence_when_best_last_but_still_matches_firsttest_arg_matching_precedence_when_best_last_but_still_matches_first497,12648
750
+ def test_never_and_never_calledtest_never_and_never_called505,12880
751
+ def test_never_and_called_oncetest_never_and_called_once511,12995
752
+ def test_once_called_oncetest_once_called_once520,13182
753
+ def test_once_but_never_calledtest_once_but_never_called527,13316
754
+ def test_once_but_called_twicetest_once_but_called_twice535,13498
755
+ def test_twice_and_called_twicetest_twice_and_called_twice545,13712
756
+ def test_zero_or_more_called_zerotest_zero_or_more_called_zero553,13867
757
+ def test_zero_or_more_called_oncetest_zero_or_more_called_once559,13989
758
+ def test_zero_or_more_called_100test_zero_or_more_called_100566,14122
759
+ def test_timestest_times573,14268
760
+ def test_at_least_called_oncetest_at_least_called_once580,14409
761
+ def test_at_least_but_never_calledtest_at_least_but_never_called587,14556
762
+ def test_at_least_once_but_called_twicetest_at_least_once_but_called_twice595,14754
763
+ def test_at_least_and_exacttest_at_least_and_exact603,14925
764
+ def test_at_most_but_never_calledtest_at_most_but_never_called613,15150
765
+ def test_at_most_called_oncetest_at_most_called_once619,15286
766
+ def test_at_most_called_twicetest_at_most_called_twice626,15431
767
+ def test_at_most_and_at_least_called_nevertest_at_most_and_at_least_called_never636,15654
768
+ def test_at_most_and_at_least_called_oncetest_at_most_and_at_least_called_once644,15874
769
+ def test_at_most_and_at_least_called_twicetest_at_most_and_at_least_called_twice651,16047
770
+ def test_at_most_and_at_least_called_three_timestest_at_most_and_at_least_called_three_times659,16235
771
+ def test_call_counts_only_apply_to_matching_argstest_call_counts_only_apply_to_matching_args670,16508
772
+ def test_call_counts_only_apply_to_matching_args_with_mismatchtest_call_counts_only_apply_to_matching_args_with_mismatch682,16786
773
+ def test_ordered_calls_in_order_will_passtest_ordered_calls_in_order_will_pass698,17219
774
+ def test_ordered_calls_out_of_order_will_failtest_ordered_calls_out_of_order_will_fail708,17401
775
+ def test_order_calls_with_different_arg_lists_and_in_order_will_passtest_order_calls_with_different_arg_lists_and_in_order_will_pass720,17657
776
+ 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_fail730,17904
777
+ def test_unordered_calls_do_not_effect_ordered_testingtest_unordered_calls_do_not_effect_ordered_testing742,18225
778
+ def test_ordered_with_multiple_calls_will_passtest_ordered_with_multiple_calls_will_pass756,18489
779
+ def test_grouped_ordering_with_numberstest_grouped_ordering_with_numbers768,18698
780
+ def test_grouped_ordering_with_symbolstest_grouped_ordering_with_symbols783,19013
781
+ def test_explicit_ordering_mixed_with_implicit_ordering_should_not_overlaptest_explicit_ordering_mixed_with_implicit_ordering_should_not_overlap798,19369
782
+ def test_explicit_ordering_with_explicit_misorderstest_explicit_ordering_with_explicit_misorders808,19742
783
+ def test_ordering_with_explicit_no_args_matches_correctlytest_ordering_with_explicit_no_args_matches_correctly824,20265
784
+ def test_ordering_with_any_arg_matching_correctly_matchestest_ordering_with_any_arg_matching_correctly_matches836,20638
785
+ def test_ordering_between_mocks_is_not_normally_definedtest_ordering_between_mocks_is_not_normally_defined847,20946
786
+ def test_ordering_between_mocks_is_honored_for_global_orderingtest_ordering_between_mocks_is_honored_for_global_ordering859,21200
787
+ def test_expectation_formatingtest_expectation_formating871,21504
788
+ def test_multi_expectation_formattingtest_multi_expectation_formatting880,21732
789
+ def test_explicit_ordering_with_limits_allow_multiple_return_valuestest_explicit_ordering_with_limits_allow_multiple_return_values886,21895
790
+ def test_global_methods_can_be_mockedtest_global_methods_can_be_mocked905,22606
791
+ def test_kernel_methods_can_be_mockedtest_kernel_methods_can_be_mocked911,22790
792
+ def test_undefing_kernel_methods_dont_effect_other_mockstest_undefing_kernel_methods_dont_effect_other_mocks917,22968
793
+ def test_expectations_can_by_marked_as_defaulttest_expectations_can_by_marked_as_default925,23236
794
+ def test_default_expectations_are_search_in_the_proper_ordertest_default_expectations_are_search_in_the_proper_order931,23398
795
+ def test_expectations_with_count_constraints_can_by_marked_as_defaulttest_expectations_with_count_constraints_can_by_marked_as_default939,23701
796
+ def test_default_expectations_are_overridden_by_later_expectationstest_default_expectations_are_overridden_by_later_expectations947,23937
797
+ def test_default_expectations_can_be_changed_by_later_expectationstest_default_expectations_can_be_changed_by_later_expectations955,24165
798
+ def test_ordered_default_expectations_can_be_specifiedtest_ordered_default_expectations_can_be_specified966,24527
799
+ def test_ordered_default_expectations_can_be_overriddentest_ordered_default_expectations_can_be_overridden974,24768
800
+ def test_by_default_works_at_mock_leveltest_by_default_works_at_mock_level986,25039
801
+ def test_by_default_at_mock_level_does_nothing_with_no_expectationstest_by_default_at_mock_level_does_nothing_with_no_expectations997,25314
802
+ def test_partial_mocks_can_have_default_expectationstest_partial_mocks_can_have_default_expectations1003,25459
803
+ def test_partial_mocks_can_have_default_expectations_overriddentest_partial_mocks_can_have_default_expectations_overridden1009,25640
804
+ def test_wicked_and_evil_tricks_with_by_default_are_thwartedtest_wicked_and_evil_tricks_with_by_default_are_thwarted1016,25888
805
+ def test_mocks_can_handle_multi_parameter_respond_tostest_mocks_can_handle_multi_parameter_respond_tos1028,26293
806
+ def test_can_mock_operatorstest_can_mock_operators1039,26640
807
+ def assert_operator(op, &block)assert_operator1069,27704
808
+ class TestFlexMockShouldsWithInclude < Test::Unit::TestCaseTestFlexMockShouldsWithInclude1077,27858
809
+ def test_include_enables_unqualified_arg_type_referencestest_include_enables_unqualified_arg_type_references1079,27952
810
+ class TestFlexMockArgTypesDontLeak < Test::Unit::TestCaseTestFlexMockArgTypesDontLeak1087,28116
811
+ def test_unqualified_arg_type_references_are_undefined_by_defaulttest_unqualified_arg_type_references_are_undefined_by_default1088,28174
812
+
813
+ test/spys_test.rb,1971
814
+ class TestSpys < Test::Unit::TestCaseTestSpys6,82
815
+ class FooBarFooBar9,150
816
+ def foofoo10,165
817
+ def barbar12,185
818
+ def setupsetup16,212
819
+ def test_spy_detects_simple_calltest_spy_detects_simple_call21,274
820
+ def test_spy_detects_simple_call_ignoring_argstest_spy_detects_simple_call_ignoring_args26,362
821
+ def test_spy_rejects_a_never_made_calltest_spy_rejects_a_never_made_call31,471
822
+ def test_spy_detects_call_with_literal_argtest_spy_detects_call_with_literal_arg36,569
823
+ def test_spy_detects_call_with_class_argtest_spy_detects_call_with_class_arg41,673
824
+ def test_spy_rejects_call_with_non_matching_literal_argtest_spy_rejects_call_with_non_matching_literal_arg46,781
825
+ def test_spy_detects_call_with_multiple_argumentstest_spy_detects_call_with_multiple_arguments51,902
826
+ def test_spy_detects_multiple_calls_with_different_argumentstest_spy_detects_multiple_calls_with_different_arguments56,1041
827
+ def test_spy_rejects_if_times_options_not_matchingtest_spy_rejects_if_times_options_not_matching62,1191
828
+ def test_spy_detects_a_blocktest_spy_detects_a_block68,1338
829
+ def test_spy_rejects_a_blocktest_spy_rejects_a_block73,1446
830
+ def test_spy_detects_a_missing_blocktest_spy_detects_a_missing_block78,1559
831
+ def test_spy_rejects_a_missing_blocktest_spy_rejects_a_missing_block83,1672
832
+ def test_spy_ignores_missing_blocktest_spy_ignores_missing_block88,1794
833
+ def test_spy_ignores_blocktest_spy_ignores_block93,1884
834
+ def test_spy_methods_can_be_stubbedtest_spy_methods_can_be_stubbed98,1970
835
+ def test_calling_non_spy_base_methods_is_an_errortest_calling_non_spy_base_methods_is_an_error105,2165
836
+ def test_can_spy_on_explicit_stubbed_methodstest_can_spy_on_explicit_stubbed_methods111,2282
837
+ def test_can_spy_on_partial_mockstest_can_spy_on_partial_mocks117,2429
838
+ def test_can_spy_on_class_methodstest_can_spy_on_class_methods126,2643
839
+ def test_can_spy_on_regular_mockstest_can_spy_on_regular_mocks132,2798
602
840
 
603
841
  test/test_setup.rb,180
604
842
  class FlexMockFlexMock7,91
@@ -606,178 +844,43 @@ class FlexMockFlexMock7,91
606
844
  def assertion_failed_errorassertion_failed_error9,124
607
845
  def assert_failure(message=nil)assert_failure16,378
608
846
 
609
- test/test_should_ignore_missing.rb,1173
610
- class TestShouldIgnoreMissing < Test::Unit::TestCaseTestShouldIgnoreMissing14,320
611
- def setupsetup17,403
612
- def test_mocks_do_not_respond_to_undefined_methodstest_mocks_do_not_respond_to_undefined_methods21,451
613
- def test_mocks_do_respond_to_defined_methodstest_mocks_do_respond_to_defined_methods25,555
614
- def test_mocks_do_respond_to_any_method_when_ignoring_missingtest_mocks_do_respond_to_any_method_when_ignoring_missing30,695
615
- def test_ignored_methods_return_undefinedtest_ignored_methods_return_undefined35,841
616
- def test_undefined_mocking_with_argumentstest_undefined_mocking_with_arguments41,1015
617
- def test_method_chains_with_undefined_are_self_preservingtest_method_chains_with_undefined_are_self_preserving46,1163
618
- def test_method_proc_raises_error_on_unknowntest_method_proc_raises_error_on_unknown51,1328
619
- def test_method_returns_callable_proctest_method_returns_callable_proc57,1452
620
- def test_not_calling_method_proc_will_fail_count_constraintstest_not_calling_method_proc_will_fail_count_constraints64,1636
621
- def test_method_returns_do_nothing_proc_for_missing_methodstest_method_returns_do_nothing_proc_for_missing_methods73,1898
622
-
623
- test/test_should_receive.rb,11020
624
- def mock_top_level_functionmock_top_level_function14,320
625
- module KernelKernel18,361
626
- def mock_kernel_functionmock_kernel_function19,375
627
- class CatCat25,441
628
- def purrpurr26,451
629
- def meowmeow28,468
630
- class TestFlexMockShoulds < Test::Unit::TestCaseTestFlexMockShoulds32,490
631
- def test_defaultstest_defaults43,995
632
- def test_returns_with_valuetest_returns_with_value52,1163
633
- def test_returns_with_multiple_valuestest_returns_with_multiple_values60,1330
634
- def test_multiple_returnstest_multiple_returns71,1590
635
- def test_returns_with_blocktest_returns_with_block82,1850
636
- def test_block_example_from_readmetest_block_example_from_readme91,2053
637
- def test_return_with_and_without_block_interleavedtest_return_with_and_without_block_interleaved101,2349
638
- def test_and_returns_aliastest_and_returns_alias111,2629
639
- def test_and_return_undefinedtest_and_return_undefined118,2766
640
- def test_and_yield_will_continue_to_yield_the_same_valuetest_and_yield_will_continue_to_yield_the_same_value128,3115
641
- def test_and_yield_with_multiple_values_yields_the_valuestest_and_yield_with_multiple_values_yields_the_values136,3361
642
- def test_multiple_yields_are_done_sequentiallytest_multiple_yields_are_done_sequentially143,3571
643
- def test_failure_if_no_block_giventest_failure_if_no_block_given152,3843
644
- def test_failure_different_return_value_than_yield_returntest_failure_different_return_value_than_yield_return159,4026
645
- def test_multiple_yieldstest_multiple_yields168,4312
646
- def test_multiple_yields_will_yield_the_last_value_settest_multiple_yields_will_yield_the_last_value_set176,4550
647
- def test_yielding_then_not_yielding_and_then_yielding_againtest_yielding_then_not_yielding_and_then_yielding_again187,4927
648
- def test_yields_syntaxtest_yields_syntax198,5274
649
- class MyError < RuntimeErrorMyError205,5419
650
- def test_and_raises_with_exception_class_throws_exceptiontest_and_raises_with_exception_class_throws_exception208,5457
651
- def test_and_raises_with_arguments_throws_exception_made_with_argstest_and_raises_with_arguments_throws_exception_made_with_args217,5666
652
- def test_and_raises_with_a_specific_exception_throws_the_exceptiontest_and_raises_with_a_specific_exception_throws_the_exception227,5947
653
- def test_raises_is_an_alias_for_and_raisetest_raises_is_an_alias_for_and_raise238,6217
654
- def test_multiple_and_raise_clauses_will_be_done_sequentiallytest_multiple_and_raise_clauses_will_be_done_sequentially247,6422
655
- def test_and_throw_will_throw_a_symboltest_and_throw_will_throw_a_symbol259,6820
656
- def test_and_throw_with_expression_will_throwtest_and_throw_with_expression_will_throw270,7063
657
- def test_throws_is_an_alias_for_and_throwtest_throws_is_an_alias_for_and_throw281,7345
658
- def test_multiple_throws_will_be_done_sequentiallytest_multiple_throws_will_be_done_sequentially292,7620
659
- def test_multiple_expectationstest_multiple_expectations304,7950
660
- def test_with_no_args_with_no_argstest_with_no_args_with_no_args314,8181
661
- def test_with_no_args_but_with_argstest_with_no_args_but_with_args321,8309
662
- def test_with_any_argstest_with_any_args330,8508
663
- def test_with_any_single_arg_matchingtest_with_any_single_arg_matching340,8686
664
- def test_with_any_single_arg_nonmatchingtest_with_any_single_arg_nonmatching348,8879
665
- def test_with_equal_arg_matchingtest_with_equal_arg_matching358,9114
666
- def test_with_ducktype_arg_matchingtest_with_ducktype_arg_matching365,9277
667
- def test_with_ducktype_arg_matching_no_matchtest_with_ducktype_arg_matching_no_match372,9456
668
- def test_with_hash_matchingtest_with_hash_matching381,9680
669
- def test_with_hash_non_matchingtest_with_hash_non_matching388,9868
670
- def test_with_equal_arg_nonmatchingtest_with_equal_arg_nonmatching397,10088
671
- def test_with_arbitrary_arg_matchingtest_with_arbitrary_arg_matching406,10325
672
- def test_args_matching_with_regextest_args_matching_with_regex421,10745
673
- def test_arg_matching_with_regex_matching_non_stringtest_arg_matching_with_regex_matching_non_string433,11066
674
- def test_arg_matching_with_classtest_arg_matching_with_class440,11243
675
- def test_arg_matching_with_no_matchtest_arg_matching_with_no_match451,11527
676
- def test_arg_matching_with_string_doesnt_over_matchtest_arg_matching_with_string_doesnt_over_match460,11740
677
- def test_block_arg_given_to_no_argstest_block_arg_given_to_no_args469,11959
678
- def test_block_arg_given_to_matching_proctest_block_arg_given_to_matching_proc478,12163
679
- def test_arg_matching_precedence_when_best_firsttest_arg_matching_precedence_when_best_first489,12448
680
- def test_arg_matching_precedence_when_best_last_but_still_matches_firsttest_arg_matching_precedence_when_best_last_but_still_matches_first497,12657
681
- def test_never_and_never_calledtest_never_and_never_called505,12889
682
- def test_never_and_called_oncetest_never_and_called_once511,13004
683
- def test_once_called_oncetest_once_called_once520,13196
684
- def test_once_but_never_calledtest_once_but_never_called527,13330
685
- def test_once_but_called_twicetest_once_but_called_twice535,13517
686
- def test_twice_and_called_twicetest_twice_and_called_twice545,13736
687
- def test_zero_or_more_called_zerotest_zero_or_more_called_zero553,13891
688
- def test_zero_or_more_called_oncetest_zero_or_more_called_once559,14013
689
- def test_zero_or_more_called_100test_zero_or_more_called_100566,14146
690
- def test_timestest_times573,14292
691
- def test_at_least_called_oncetest_at_least_called_once580,14433
692
- def test_at_least_but_never_calledtest_at_least_but_never_called587,14580
693
- def test_at_least_once_but_called_twicetest_at_least_once_but_called_twice595,14783
694
- def test_at_least_and_exacttest_at_least_and_exact603,14954
695
- def test_at_most_but_never_calledtest_at_most_but_never_called613,15184
696
- def test_at_most_called_oncetest_at_most_called_once619,15320
697
- def test_at_most_called_twicetest_at_most_called_twice626,15465
698
- def test_at_most_and_at_least_called_nevertest_at_most_and_at_least_called_never636,15693
699
- def test_at_most_and_at_least_called_oncetest_at_most_and_at_least_called_once644,15918
700
- def test_at_most_and_at_least_called_twicetest_at_most_and_at_least_called_twice651,16091
701
- def test_at_most_and_at_least_called_three_timestest_at_most_and_at_least_called_three_times659,16279
702
- def test_call_counts_only_apply_to_matching_argstest_call_counts_only_apply_to_matching_args670,16557
703
- def test_call_counts_only_apply_to_matching_args_with_mismatchtest_call_counts_only_apply_to_matching_args_with_mismatch682,16835
704
- def test_ordered_calls_in_order_will_passtest_ordered_calls_in_order_will_pass698,17268
705
- def test_ordered_calls_out_of_order_will_failtest_ordered_calls_out_of_order_will_fail708,17450
706
- def test_order_calls_with_different_arg_lists_and_in_order_will_passtest_order_calls_with_different_arg_lists_and_in_order_will_pass720,17711
707
- 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_fail730,17958
708
- def test_unordered_calls_do_not_effect_ordered_testingtest_unordered_calls_do_not_effect_ordered_testing742,18284
709
- def test_ordered_with_multiple_calls_will_passtest_ordered_with_multiple_calls_will_pass756,18548
710
- def test_grouped_ordering_with_numberstest_grouped_ordering_with_numbers768,18757
711
- def test_grouped_ordering_with_symbolstest_grouped_ordering_with_symbols783,19072
712
- def test_explicit_ordering_mixed_with_implicit_ordering_should_not_overlaptest_explicit_ordering_mixed_with_implicit_ordering_should_not_overlap798,19428
713
- def test_explicit_ordering_with_explicit_misorderstest_explicit_ordering_with_explicit_misorders808,19801
714
- def test_ordering_with_explicit_no_args_matches_correctlytest_ordering_with_explicit_no_args_matches_correctly824,20329
715
- def test_ordering_with_any_arg_matching_correctly_matchestest_ordering_with_any_arg_matching_correctly_matches836,20702
716
- def test_ordering_between_mocks_is_not_normally_definedtest_ordering_between_mocks_is_not_normally_defined847,21010
717
- def test_ordering_between_mocks_is_honored_for_global_orderingtest_ordering_between_mocks_is_honored_for_global_ordering859,21264
718
- def test_expectation_formatingtest_expectation_formating871,21573
719
- def test_multi_expectation_formattingtest_multi_expectation_formatting880,21801
720
- def test_explicit_ordering_with_limits_allow_multiple_return_valuestest_explicit_ordering_with_limits_allow_multiple_return_values886,21964
721
- def test_global_methods_can_be_mockedtest_global_methods_can_be_mocked905,22675
722
- def test_kernel_methods_can_be_mockedtest_kernel_methods_can_be_mocked911,22859
723
- def test_undefing_kernel_methods_dont_effect_other_mockstest_undefing_kernel_methods_dont_effect_other_mocks917,23037
724
- def test_expectations_can_by_marked_as_defaulttest_expectations_can_by_marked_as_default925,23305
725
- def test_default_expectations_are_search_in_the_proper_ordertest_default_expectations_are_search_in_the_proper_order931,23467
726
- def test_expectations_with_count_constraints_can_by_marked_as_defaulttest_expectations_with_count_constraints_can_by_marked_as_default939,23770
727
- def test_default_expectations_are_overridden_by_later_expectationstest_default_expectations_are_overridden_by_later_expectations947,24006
728
- def test_default_expectations_can_be_changed_by_later_expectationstest_default_expectations_can_be_changed_by_later_expectations955,24234
729
- def test_ordered_default_expectations_can_be_specifiedtest_ordered_default_expectations_can_be_specified966,24596
730
- def test_ordered_default_expectations_can_be_overriddentest_ordered_default_expectations_can_be_overridden974,24837
731
- def test_by_default_works_at_mock_leveltest_by_default_works_at_mock_level986,25108
732
- def test_by_default_at_mock_level_does_nothing_with_no_expectationstest_by_default_at_mock_level_does_nothing_with_no_expectations997,25383
733
- def test_partial_mocks_can_have_default_expectationstest_partial_mocks_can_have_default_expectations1003,25528
734
- def test_partial_mocks_can_have_default_expectations_overriddentest_partial_mocks_can_have_default_expectations_overridden1009,25709
735
- def test_wicked_and_evil_tricks_with_by_default_are_thwartedtest_wicked_and_evil_tricks_with_by_default_are_thwarted1016,25957
736
- def test_mocks_can_handle_multi_parameter_respond_tostest_mocks_can_handle_multi_parameter_respond_tos1028,26362
737
- def test_can_mock_operatorstest_can_mock_operators1039,26709
738
- def assert_operator(op, &block)assert_operator1069,27773
739
- class TestFlexMockShouldsWithInclude < Test::Unit::TestCaseTestFlexMockShouldsWithInclude1077,27927
740
- def test_include_enables_unqualified_arg_type_referencestest_include_enables_unqualified_arg_type_references1079,28021
741
- class TestFlexMockArgTypesDontLeak < Test::Unit::TestCaseTestFlexMockArgTypesDontLeak1087,28185
742
- def test_unqualified_arg_type_references_are_undefined_by_defaulttest_unqualified_arg_type_references_are_undefined_by_default1088,28243
743
-
744
- test/test_tu_integration.rb,1570
745
- class TestTuIntegrationFlexMockMethod < Test::Unit::TestCaseTestTuIntegrationFlexMockMethod14,320
746
- def test_can_construct_flexmocktest_can_construct_flexmock17,411
747
- def test_can_construct_flexmock_with_blocktest_can_construct_flexmock_with_block23,558
748
- class TestTuIntegrationMockVerificationInTeardown < Test::Unit::TestCaseTestTuIntegrationMockVerificationInTeardown31,734
749
- def teardownteardown34,837
750
- def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown40,923
751
- class TestTuIntegrationMockVerificationWithoutSetup < Test::Unit::TestCaseTestTuIntegrationMockVerificationWithoutSetup45,1041
752
- def teardownteardown48,1146
753
- def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown54,1232
754
- class TestTuIntegrationMockVerificationForgetfulSetup < Test::Unit::TestCaseTestTuIntegrationMockVerificationForgetfulSetup59,1350
755
- def teardownteardown62,1457
756
- def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown68,1543
757
- class TestTuIntegrationSetupOverridenAndNoMocksOk < Test::Unit::TestCaseTestTuIntegrationSetupOverridenAndNoMocksOk73,1661
758
- def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown76,1764
759
- class TestTuIntegrationFailurePreventsVerification < Test::Unit::TestCaseTestTuIntegrationFailurePreventsVerification80,1827
760
- def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown83,1931
761
- def simulate_failuresimulate_failure90,2065
762
-
763
- test/test_undefined.rb,873
764
- class UndefinedTest < Test::Unit::TestCaseUndefinedTest14,320
765
- def test_undefined_method_calls_return_undefinedtest_undefined_method_calls_return_undefined15,363
766
- def test_equalstest_equals19,481
767
- def test_math_operatorstest_math_operators24,579
768
- def test_math_operators_reversedtest_math_operators_reversed32,788
769
- def test_comparisonstest_comparisons40,1006
770
- def test_comparisons_reversedtest_comparisons_reversed48,1215
771
- def test_base_level_methodstest_base_level_methods56,1433
772
- def test_cant_create_a_new_undefinedtest_cant_create_a_new_undefined60,1520
773
- def test_cant_clone_undefinedtest_cant_clone_undefined64,1630
774
- def test_string_representationstest_string_representations69,1764
775
- def test_undefined_is_not_niltest_undefined_is_not_nil74,1902
776
- def assert_undefined(obj)assert_undefined80,1980
777
- def undefinedundefined84,2043
778
-
779
- test/test_unit_integration/test_auto_test_unit.rb,263
780
- class TestFlexmockTestUnit < Test::Unit::TestCaseTestFlexmockTestUnit17,374
781
- def teardownteardown18,424
782
- def test_can_create_mockstest_can_create_mocks23,483
783
- def test_should_fail__mocks_are_auto_verifiedtest_should_fail__mocks_are_auto_verified30,626
847
+ ,263
848
+ class TestFlexmockTestUnit < Test::Unit::TestCaseTestFlexmockTestUnit17,375
849
+ def teardownteardown18,425
850
+ def test_can_create_mockstest_can_create_mocks23,484
851
+ def test_should_fail__mocks_are_auto_verifiedtest_should_fail__mocks_are_auto_verified30,627
852
+
853
+ /var/folders/b9/zwv8g_296jq17rcjpjw_94jc0000gn/T//tags.o7MZW1,1606
854
+ class TestTuIntegrationFlexMockMethod < Test::Unit::TestCaseTestTuIntegrationFlexMockMethod19,548
855
+ def test_can_construct_flexmocktest_can_construct_flexmock22,643
856
+ def test_can_construct_flexmock_with_blocktest_can_construct_flexmock_with_block28,800
857
+ class TestTuIntegrationMockVerificationInTeardown < Test::Unit::TestCaseTestTuIntegrationMockVerificationInTeardown36,990
858
+ def teardownteardown39,1097
859
+ def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown45,1193
860
+ class TestTuIntegrationMockVerificationWithoutSetup < Test::Unit::TestCaseTestTuIntegrationMockVerificationWithoutSetup50,1319
861
+ def teardownteardown53,1428
862
+ def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown59,1524
863
+ class TestTuIntegrationMockVerificationForgetfulSetup < Test::Unit::TestCaseTestTuIntegrationMockVerificationForgetfulSetup64,1650
864
+ def teardownteardown67,1761
865
+ def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown73,1857
866
+ class TestTuIntegrationSetupOverridenAndNoMocksOk < Test::Unit::TestCaseTestTuIntegrationSetupOverridenAndNoMocksOk78,1983
867
+ def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown81,2090
868
+ class TestTuIntegrationFailurePreventsVerification < Test::Unit::TestCaseTestTuIntegrationFailurePreventsVerification85,2159
869
+ def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown88,2267
870
+ def simulate_failuresimulate_failure95,2411
871
+
872
+ test/undefined_test.rb,873
873
+ class UndefinedTest < Test::Unit::TestCaseUndefinedTest14,321
874
+ def test_undefined_method_calls_return_undefinedtest_undefined_method_calls_return_undefined15,364
875
+ def test_equalstest_equals19,482
876
+ def test_math_operatorstest_math_operators24,580
877
+ def test_math_operators_reversedtest_math_operators_reversed32,789
878
+ def test_comparisonstest_comparisons40,1007
879
+ def test_comparisons_reversedtest_comparisons_reversed48,1216
880
+ def test_base_level_methodstest_base_level_methods56,1434
881
+ def test_cant_create_a_new_undefinedtest_cant_create_a_new_undefined60,1521
882
+ def test_cant_clone_undefinedtest_cant_clone_undefined64,1631
883
+ def test_string_representationstest_string_representations69,1765
884
+ def test_undefined_is_not_niltest_undefined_is_not_nil74,1903
885
+ def assert_undefined(obj)assert_undefined80,1981
886
+ def undefinedundefined84,2044