flexmock 0.8.11 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/Rakefile +23 -65
- data/TAGS +689 -691
- data/doc/releases/flexmock-0.9.0.rdoc +89 -0
- data/lib/flexmock.rb +1 -1
- data/lib/flexmock/argument_matchers.rb +5 -5
- data/lib/flexmock/argument_types.rb +1 -1
- data/lib/flexmock/base.rb +1 -1
- data/lib/flexmock/core.rb +5 -5
- data/lib/flexmock/core_class_methods.rb +6 -6
- data/lib/flexmock/default_framework_adapter.rb +2 -2
- data/lib/flexmock/deprecated_methods.rb +1 -1
- data/lib/flexmock/errors.rb +1 -1
- data/lib/flexmock/expectation.rb +12 -12
- data/lib/flexmock/expectation_director.rb +1 -1
- data/lib/flexmock/mock_container.rb +12 -2
- data/lib/flexmock/noop.rb +2 -2
- data/lib/flexmock/ordering.rb +1 -1
- data/lib/flexmock/partial_mock.rb +10 -3
- data/lib/flexmock/rails.rb +1 -1
- data/lib/flexmock/recorder.rb +1 -1
- data/lib/flexmock/rspec.rb +1 -1
- data/lib/flexmock/test_unit.rb +2 -2
- data/lib/flexmock/test_unit_integration.rb +5 -5
- data/lib/flexmock/undefined.rb +8 -4
- data/lib/flexmock/validators.rb +2 -2
- data/lib/flexmock/version.rb +11 -0
- data/test/{test_aliasing.rb → aliasing_test.rb} +7 -8
- data/test/{test_container_methods.rb → container_methods_test.rb} +21 -22
- data/test/{test_default_framework_adapter.rb → default_framework_adapter_test.rb} +8 -9
- data/test/{test_demeter_mocking.rb → demeter_mocking_test.rb} +1 -4
- data/test/{test_deprecated_methods.rb → deprecated_methods_test.rb} +11 -13
- data/test/{test_examples_from_readme.rb → examples_from_readme_test.rb} +5 -6
- data/test/{test_extended_should_receive.rb → extended_should_receive_test.rb} +11 -12
- data/test/{test_flexmodel.rb → flexmodel_test.rb} +1 -2
- data/test/{test_naming.rb → naming_test.rb} +5 -6
- data/test/{test_new_instances.rb → new_instances_test.rb} +36 -28
- data/test/{test_partial_mock.rb → partial_mock_test.rb} +20 -18
- data/test/{test_rails_view_stub.rb → rails_view_stub_test.rb} +3 -3
- data/test/{test_record_mode.rb → record_mode_test.rb} +2 -5
- data/test/rspec_integration/integration_spec.rb +14 -8
- data/test/{test_samples.rb → samples_test.rb} +13 -14
- data/test/{test_should_ignore_missing.rb → should_ignore_missing_test.rb} +4 -6
- data/test/{test_should_receive.rb → should_receive_test.rb} +39 -42
- data/test/test_setup.rb +30 -0
- data/test/test_unit_integration/{test_auto_test_unit.rb → auto_test_unit_test.rb} +4 -4
- data/test/tu_integration_test.rb +99 -0
- data/test/{test_undefined.rb → undefined_test.rb} +2 -3
- metadata +31 -39
- data/test/asserts.rb +0 -34
- data/test/test_tu_integration.rb +0 -94
data/README.rdoc
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
FlexMock is a simple, but flexible, mock object library for Ruby unit
|
4
4
|
testing.
|
5
5
|
|
6
|
-
Version :: 0.
|
6
|
+
Version :: 0.9.0.beta.0
|
7
7
|
|
8
8
|
= Links
|
9
9
|
|
@@ -935,7 +935,7 @@ above copyright notice is included.
|
|
935
935
|
= Other stuff
|
936
936
|
|
937
937
|
Author:: Jim Weirich <jim@weirichhouse.org>
|
938
|
-
Requires:: Ruby 1.8.
|
938
|
+
Requires:: Ruby 1.8.7 or later (Use Flexmock-0.8.8 for Ruby version 1.8.6)
|
939
939
|
|
940
940
|
== Warranty
|
941
941
|
|
data/Rakefile
CHANGED
@@ -10,16 +10,18 @@
|
|
10
10
|
#+++
|
11
11
|
task :noop
|
12
12
|
require 'rubygems'
|
13
|
-
require 'rake/gempackagetask'
|
14
13
|
require 'rake/clean'
|
15
|
-
require 'rake/rdoctask'
|
16
14
|
require 'rake/testtask'
|
17
15
|
require 'rake/contrib/rubyforgepublisher'
|
18
16
|
|
17
|
+
require 'rubygems/package_task'
|
18
|
+
|
19
19
|
CLEAN.include('*.tmp')
|
20
20
|
CLOBBER.include("html", 'pkg')
|
21
21
|
|
22
|
-
|
22
|
+
load './lib/flexmock/version.rb'
|
23
|
+
|
24
|
+
PKG_VERSION = FlexMock::VERSION
|
23
25
|
|
24
26
|
PKG_FILES = FileList[
|
25
27
|
'[A-Z]*',
|
@@ -44,13 +46,14 @@ task :ta => [:test_all]
|
|
44
46
|
# Test Targets -------------------------------------------------------
|
45
47
|
|
46
48
|
Rake::TestTask.new do |t|
|
47
|
-
t.
|
49
|
+
t.test_files = FileList['test/*_test.rb']
|
50
|
+
t.libs << "."
|
48
51
|
t.verbose = false
|
49
52
|
t.warning = true
|
50
53
|
end
|
51
54
|
|
52
55
|
Rake::TestTask.new(:test_extended) do |t|
|
53
|
-
t.test_files = FileList['test/extended
|
56
|
+
t.test_files = FileList['test/extended/*_test.rb']
|
54
57
|
t.verbose = true
|
55
58
|
t.warning = true
|
56
59
|
end
|
@@ -80,21 +83,14 @@ end
|
|
80
83
|
|
81
84
|
# RDoc Target --------------------------------------------------------
|
82
85
|
|
83
|
-
task :rdoc => ["
|
84
|
-
|
85
|
-
|
86
|
-
rdoc
|
87
|
-
rdoc.template = 'doc/jamis.rb'
|
88
|
-
# rdoc.template = 'html'
|
89
|
-
# rdoc.template = 'kilmer'
|
90
|
-
# rdoc.template = 'css2'
|
91
|
-
rdoc.title = "Flex Mock"
|
92
|
-
rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README.rdoc'
|
93
|
-
rdoc.rdoc_files.include(RDOC_FILES)
|
86
|
+
task :rdoc => ["html/index.html"]
|
87
|
+
|
88
|
+
file "html/index.html" => ["Rakefile"] + RDOC_FILES do
|
89
|
+
sh "rdoc -o html --title FlexMock --line-numbers -m README.rdoc #{RDOC_FILES}"
|
94
90
|
end
|
95
91
|
|
96
|
-
file "README.rdoc" => ["Rakefile"] do
|
97
|
-
ruby %{-i.bak -pe 'sub!(/^Version *:: *(\\d+\\.)+\\d+ *$/, "Version :: #{PKG_VERSION}")' README.rdoc} # "
|
92
|
+
file "README.rdoc" => ["Rakefile", "lib/flexmock/version.rb"] do
|
93
|
+
ruby %{-i.bak -pe '$_.sub!(/^Version *:: *(\\d+\\.)+\\d+ *$/, "Version :: #{PKG_VERSION}")' README.rdoc} # "
|
98
94
|
end
|
99
95
|
|
100
96
|
# Package Task -------------------------------------------------------
|
@@ -135,80 +131,42 @@ else
|
|
135
131
|
#### Documentation and testing.
|
136
132
|
|
137
133
|
s.has_rdoc = true
|
138
|
-
s.extra_rdoc_files =
|
134
|
+
s.extra_rdoc_files = RDOC_FILES.reject { |fn| fn =~ /\.rb$/ }.to_a
|
139
135
|
s.rdoc_options <<
|
140
|
-
'--title' << '
|
141
|
-
'--main' << 'README' <<
|
136
|
+
'--title' << 'FlexMock' <<
|
137
|
+
'--main' << 'README.rdoc' <<
|
142
138
|
'--line-numbers'
|
143
139
|
|
144
140
|
#### Author and project details.
|
145
141
|
|
146
142
|
s.author = "Jim Weirich"
|
147
|
-
s.email = "jim@
|
148
|
-
s.homepage = "
|
143
|
+
s.email = "jim.weirich@gmail.com"
|
144
|
+
s.homepage = "https://github.com/jimweirich/flexmock"
|
149
145
|
end
|
150
146
|
|
151
|
-
|
147
|
+
Gem::PackageTask.new(spec) do |pkg|
|
152
148
|
pkg.need_zip = true
|
153
|
-
pkg.need_tar =
|
149
|
+
pkg.need_tar = false
|
154
150
|
end
|
155
151
|
end
|
156
152
|
|
157
|
-
desc "Display a list of all the rubyfiles in the project."
|
158
|
-
task :rubyfiles do
|
159
|
-
puts FileList['**/*.rb']
|
160
|
-
end
|
161
|
-
task :rf => :rubyfiles
|
162
|
-
|
163
153
|
require 'rake/contrib/publisher'
|
164
154
|
require 'rake/contrib/sshpublisher'
|
165
155
|
|
166
156
|
publisher = Rake::CompositePublisher.new
|
167
157
|
publisher.add(Rake::RubyForgePublisher.new('flexmock', 'jimweirich'))
|
168
|
-
publisher.add(Rake::SshFreshDirPublisher.new(
|
169
|
-
'umlcoop',
|
170
|
-
'htdocs/software/flexmock',
|
171
|
-
'html'))
|
172
|
-
publisher.add(Rake::SshFilePublisher.new(
|
173
|
-
'umlcoop',
|
174
|
-
'htdocs/software/flexmock',
|
175
|
-
'.',
|
176
|
-
'flexmock.blurb'))
|
177
158
|
|
178
159
|
desc "Publish the documentation on public websites"
|
179
160
|
task :publish => [:rdoc] do
|
180
161
|
publisher.upload
|
181
162
|
end
|
182
163
|
|
183
|
-
SVNHOME = 'svn://localhost/software/flexmock'
|
184
|
-
|
185
164
|
task :specs do
|
186
165
|
specs = FileList['test/spec_*.rb']
|
187
166
|
ENV['RUBYLIB'] = "lib:test:#{ENV['RUBYLIB']}"
|
188
|
-
sh %{
|
167
|
+
sh %{rspec #{specs}}
|
189
168
|
end
|
190
169
|
|
191
170
|
task :tag do
|
192
|
-
sh "
|
171
|
+
sh "git tag 'flexmock-#{PKG_VERSION}'"
|
193
172
|
end
|
194
|
-
|
195
|
-
RUBY_FILES = FileList['**/*.rb']
|
196
|
-
RUBY_FILES.exclude(/^pkg/)
|
197
|
-
task :dbg do
|
198
|
-
RUBY_FILES.egrep(/DBG/)
|
199
|
-
end
|
200
|
-
|
201
|
-
# Tagging ------------------------------------------------------------
|
202
|
-
|
203
|
-
# module Tags
|
204
|
-
# RUBY_FILES = FileList['**/*.rb'].exclude("pkg")
|
205
|
-
# end
|
206
|
-
|
207
|
-
# namespace "tags" do
|
208
|
-
# task :emacs => Tags::RUBY_FILES do
|
209
|
-
# puts "Making Emacs TAGS file"
|
210
|
-
# sh "xctags -e #{Tags::RUBY_FILES}", :verbose => false
|
211
|
-
# end
|
212
|
-
# end
|
213
|
-
|
214
|
-
# task :tags => ["tags:emacs"]
|
data/TAGS
CHANGED
@@ -6,36 +6,36 @@ module PagePage2,12
|
|
6
6
|
install.rb,29
|
7
7
|
def indir(newdir)indir7,68
|
8
8
|
|
9
|
-
lib/flexmock/argument_matchers.rb,
|
10
|
-
class FlexMockFlexMock14,
|
11
|
-
class AnyMatcherAnyMatcher17,
|
12
|
-
def ===(target)===18,
|
13
|
-
def inspectinspect21,
|
14
|
-
class EqualMatcherEqualMatcher28,
|
15
|
-
def initialize(obj)initialize29,
|
16
|
-
def ===(target)===32,
|
17
|
-
def inspectinspect35,
|
18
|
-
class ProcMatcherProcMatcher44,
|
19
|
-
def initialize(&block)initialize45,
|
20
|
-
def ===(target)===48,
|
21
|
-
def inspectinspect51,
|
22
|
-
class HashMatcherHashMatcher58,
|
23
|
-
def initialize(hash)initialize59,
|
24
|
-
def ===(target)===62,
|
25
|
-
def inspectinspect65,
|
26
|
-
class DuckMatcherDuckMatcher72,
|
27
|
-
def initialize(methods)initialize73,
|
28
|
-
def ===(target)===76,
|
29
|
-
def inspectinspect79,
|
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
30
|
|
31
31
|
lib/flexmock/argument_types.rb,228
|
32
|
-
class FlexMockFlexMock14,
|
33
|
-
module ArgumentTypesArgumentTypes21,
|
34
|
-
def anyany23,
|
35
|
-
def eq(obj)eq29,
|
36
|
-
def on(&block)on36,
|
37
|
-
def hsh(hash)hsh42,
|
38
|
-
def ducktype(*methods)ducktype48,
|
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
|
39
39
|
|
40
40
|
lib/flexmock/base.rb,0
|
41
41
|
|
@@ -43,166 +43,166 @@ lib/flexmock/composite.rb,30
|
|
43
43
|
class FlexMockFlexMock8,133
|
44
44
|
|
45
45
|
lib/flexmock/core.rb,900
|
46
|
-
class FlexMockFlexMock46,
|
47
|
-
def initialize(name="unknown", container=nil)initialize55,
|
48
|
-
def inspectinspect65,
|
49
|
-
def flexmock_verifyflexmock_verify71,
|
50
|
-
def flexmock_teardownflexmock_teardown82,
|
51
|
-
def should_ignore_missingshould_ignore_missing86,
|
52
|
-
def by_defaultby_default91,
|
53
|
-
def method_missing(sym, *args, &block)method_missing97,
|
54
|
-
def respond_to?(sym, *args)respond_to?114,
|
55
|
-
def flexmock_find_expectation(method_name, *args) # :nodoc:flexmock_find_expectation119,
|
56
|
-
def flexmock_expectations_for(method_name) # :nodoc:flexmock_expectations_for125,
|
57
|
-
def method(sym)method130,
|
58
|
-
def should_receive(*args)should_receive159,
|
59
|
-
def should_expectshould_expect182,
|
60
|
-
def flexmock_wrap(&block)flexmock_wrap190,
|
61
|
-
def override_existing_method(sym)override_existing_method204,
|
62
|
-
def sclasssclass213,
|
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
63
|
|
64
64
|
lib/flexmock/core_class_methods.rb,289
|
65
|
-
class FlexMockFlexMock15,
|
66
|
-
def use(*names)use39,
|
67
|
-
def format_args(sym, args) # :nodoc:format_args53,
|
68
|
-
def check(msg, &block) # :nodoc:check63,
|
69
|
-
class UseContainerUseContainer70,
|
70
|
-
def initializeinitialize75,
|
71
|
-
def passed?passed?79,
|
65
|
+
class FlexMockFlexMock15,352
|
66
|
+
def use(*names)use39,1293
|
67
|
+
def format_args(sym, args) # :nodoc:format_args53,1691
|
68
|
+
def check(msg, &block) # :nodoc:check63,1992
|
69
|
+
class UseContainerUseContainer70,2165
|
70
|
+
def initializeinitialize75,2247
|
71
|
+
def passed?passed?79,2304
|
72
72
|
|
73
73
|
lib/flexmock/default_framework_adapter.rb,345
|
74
|
-
class FlexMockFlexMock14,
|
75
|
-
class DefaultFrameworkAdapterDefaultFrameworkAdapter15,
|
76
|
-
def assert_block(msg, &block)assert_block16,
|
77
|
-
def assert_equal(a, b, msg=nil)assert_equal22,
|
78
|
-
class AssertionFailedError < StandardError; endAssertionFailedError26,
|
79
|
-
def assertion_failed_errorassertion_failed_error27,
|
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
|
80
80
|
|
81
81
|
lib/flexmock/deprecated_methods.rb,340
|
82
|
-
class ModuleModule13,
|
83
|
-
def flexmock_deprecate(*method_names)flexmock_deprecate14,
|
84
|
-
class FlexMockFlexMock33,
|
85
|
-
def mock_handle(sym, expected_count=nil, &block) # :nodoc:mock_handle40,
|
86
|
-
class PartialMockProxyPartialMockProxy47,
|
87
|
-
def any_instance(&block)any_instance53,
|
88
|
-
module OrderingOrdering59,
|
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
89
|
|
90
90
|
lib/flexmock/errors.rb,137
|
91
|
-
class FlexMockFlexMock14,
|
92
|
-
class UsageError < ::RuntimeErrorUsageError17,
|
93
|
-
class MockError < ::RuntimeErrorMockError20,
|
94
|
-
|
95
|
-
lib/flexmock/expectation.rb,
|
96
|
-
class FlexMockFlexMock14,
|
97
|
-
class ExpectationExpectation28,
|
98
|
-
def initialize(mock, sym)initialize34,
|
99
|
-
def to_sto_s49,
|
100
|
-
def verify_call(*args)verify_call55,
|
101
|
-
def _return_value(args) # :nodoc:_return_value64,
|
102
|
-
def return_value(args)return_value69,
|
103
|
-
def perform_yielding(args)perform_yielding83,
|
104
|
-
def eligible?eligible?99,
|
105
|
-
def call_count_constrained?call_count_constrained?104,
|
106
|
-
def validate_ordervalidate_order109,
|
107
|
-
def flexmock_verifyflexmock_verify121,
|
108
|
-
def match_args(args)match_args129,
|
109
|
-
def match_arg(expected, actual)match_arg138,
|
110
|
-
def with(*args)with145,
|
111
|
-
def with_no_argswith_no_args151,
|
112
|
-
def with_any_argswith_any_args157,
|
113
|
-
def and_return(*args, &block)and_return188,
|
114
|
-
def and_return_undefinedand_return_undefined212,
|
115
|
-
def and_yield(*yield_values)and_yield228,
|
116
|
-
def and_raise(exception, *args)and_raise252,
|
117
|
-
def and_throw(sym, value=nil)and_throw266,
|
118
|
-
def zero_or_more_timeszero_or_more_times272,
|
119
|
-
def times(limit)times279,
|
120
|
-
def nevernever288,
|
121
|
-
def onceonce295,
|
122
|
-
def twicetwice302,
|
123
|
-
def at_leastat_least314,
|
124
|
-
def at_mostat_most327,
|
125
|
-
def ordered(group_name=nil)ordered356,
|
126
|
-
def globallyglobally368,
|
127
|
-
def define_ordered(group_name, ordering)define_ordered374,
|
128
|
-
def by_defaultby_default388,
|
129
|
-
class CompositeExpectationCompositeExpectation399,
|
130
|
-
def initializeinitialize402,
|
131
|
-
def add(expectation)add407,
|
132
|
-
def method_missing(sym, *args, &block)method_missing412,
|
133
|
-
def order_numberorder_number423,
|
134
|
-
def mockmock428,
|
135
|
-
def should_receive(*args, &block)should_receive434,
|
136
|
-
def to_sto_s439,
|
137
|
-
class ExpectationRecorderExpectationRecorder453,
|
138
|
-
def initializeinitialize456,
|
139
|
-
def method_missing(sym, *args, &block)method_missing461,
|
140
|
-
def apply(mock)apply469,
|
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
141
|
|
142
142
|
lib/flexmock/expectation_director.rb,483
|
143
|
-
class FlexMockFlexMock15,
|
144
|
-
class ExpectationDirectorExpectationDirector20,
|
145
|
-
def initialize(sym)initialize23,
|
146
|
-
def call(*args)call38,
|
147
|
-
def <<(expectation)<<46,
|
148
|
-
def find_expectation(*args) # :nodoc:find_expectation51,
|
149
|
-
def flexmock_verify # :nodoc:flexmock_verify62,
|
150
|
-
def defaultify_expectation(exp) # :nodoc:defaultify_expectation69,
|
151
|
-
def find_expectation_in(expectations, *args)find_expectation_in81,
|
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
152
|
|
153
153
|
lib/flexmock/mock_container.rb,944
|
154
|
-
class FlexMockFlexMock16,
|
155
|
-
module MockContainerMockContainer26,
|
156
|
-
def flexmock_teardownflexmock_teardown31,
|
157
|
-
def flexmock_verifyflexmock_verify
|
158
|
-
def flexmock_created_mocksflexmock_created_mocks
|
159
|
-
def flexmock_closeflexmock_close
|
160
|
-
def flexmock(*args)flexmock
|
161
|
-
def flexmock_remember(mocking_object)flexmock_remember
|
162
|
-
class MockContainerHelperMockContainerHelper
|
163
|
-
def next_idnext_id
|
164
|
-
def parse_should_args(mock, args, &block) # :nodoc:parse_should_args
|
165
|
-
def add_model_methods(mock, model_class, id)add_model_methods
|
166
|
-
def make_partial_proxy(container, obj, name, safe_mode)make_partial_proxy
|
167
|
-
def build_demeter_chain(mock, arg, &block)build_demeter_chain
|
168
|
-
def check_proper_mock(mock, method_name)check_proper_mock
|
169
|
-
def check_method_names(names)check_method_names
|
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
|
170
170
|
|
171
171
|
lib/flexmock/noop.rb,0
|
172
172
|
|
173
173
|
lib/flexmock/ordering.rb,399
|
174
|
-
class FlexMockFlexMock12,
|
175
|
-
module OrderingOrdering20,
|
176
|
-
def flexmock_allocate_orderflexmock_allocate_order23,
|
177
|
-
def flexmock_groupsflexmock_groups29,
|
178
|
-
def flexmock_current_orderflexmock_current_order34,
|
179
|
-
def flexmock_current_order=(value)flexmock_current_order=39,
|
180
|
-
def flexmock_validate_order(method_name, order_number)flexmock_validate_order43,
|
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
181
|
|
182
182
|
lib/flexmock/partial_mock.rb,1375
|
183
|
-
class FlexMockFlexMock14,
|
184
|
-
class PartialMockProxyPartialMockProxy26,
|
185
|
-
def initialize(obj, mock, safe_mode)initialize40,
|
186
|
-
def flexmock_getflexmock_get56,
|
187
|
-
def should_receive(*args)should_receive80,
|
188
|
-
def add_mock_method(method_name)add_mock_method91,
|
189
|
-
def new_instances(*allocators, &block)new_instances123,
|
190
|
-
def invoke_original(method, args)invoke_original144,
|
191
|
-
def flexmock_verifyflexmock_verify152,
|
192
|
-
def flexmock_teardownflexmock_teardown157,
|
193
|
-
def flexmock_containerflexmock_container169,
|
194
|
-
def flexmock_container=(container)flexmock_container=175,
|
195
|
-
def flexmock_expectations_for(method_name)flexmock_expectations_for179,
|
196
|
-
def sclasssclass186,
|
197
|
-
def singleton?(method_name)singleton?192,
|
198
|
-
def hide_existing_method(method_name)hide_existing_method202,
|
199
|
-
def stow_existing_definition(method_name)stow_existing_definition209,
|
200
|
-
def create_alias_for_existing_method(method_name)create_alias_for_existing_method229,
|
201
|
-
def define_proxy_method(method_name)define_proxy_method247,
|
202
|
-
def restore_original_definition(method_name)restore_original_definition268,
|
203
|
-
def remove_current_method(method_name)remove_current_method280,
|
204
|
-
def detached?detached?285,
|
205
|
-
def new_name(old_name)new_name290,
|
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
206
|
|
207
207
|
lib/flexmock/rails/view_mocking.rb,665
|
208
208
|
class FlexMockFlexMock3,20
|
@@ -218,67 +218,59 @@ class FlexMockFlexMock3,20
|
|
218
218
|
lib/flexmock/rails.rb,0
|
219
219
|
|
220
220
|
lib/flexmock/recorder.rb,271
|
221
|
-
class FlexMockFlexMock14,
|
222
|
-
class RecorderRecorder20,
|
223
|
-
def initialize(mock)initialize24,
|
224
|
-
def should_be_strict(is_strict=true)should_be_strict48,
|
225
|
-
def strict?strict?53,
|
226
|
-
def method_missing(sym, *args, &block)method_missing59,
|
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
|
227
227
|
|
228
228
|
lib/flexmock/rspec.rb,341
|
229
|
-
class FlexMockFlexMock14,
|
230
|
-
class RSpecFrameworkAdapterRSpecFrameworkAdapter21,
|
231
|
-
def assert_block(msg, &block)assert_block22,
|
232
|
-
def assert_equal(a, b, msg=nil)assert_equal26,
|
233
|
-
class AssertionFailedError < StandardError; endAssertionFailedError31,
|
234
|
-
def assertion_failed_errorassertion_failed_error32,
|
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
|
235
235
|
|
236
236
|
lib/flexmock/test_unit.rb,120
|
237
|
-
module TestTest14,
|
238
|
-
module UnitUnit15,
|
239
|
-
class TestCaseTestCase16,
|
240
|
-
def teardownteardown25,
|
237
|
+
module TestTest14,335
|
238
|
+
module UnitUnit15,347
|
239
|
+
class TestCaseTestCase16,361
|
240
|
+
def teardownteardown25,676
|
241
241
|
|
242
242
|
lib/flexmock/test_unit_integration.rb,227
|
243
|
-
class FlexMockFlexMock15,
|
244
|
-
module TestCaseTestCase29,
|
245
|
-
def teardownteardown35,
|
246
|
-
class TestUnitFrameworkAdapterTestUnitFrameworkAdapter45,
|
247
|
-
def assertion_failed_errorassertion_failed_error47,
|
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
248
|
|
249
249
|
lib/flexmock/undefined.rb,288
|
250
|
-
class FlexMockFlexMock12,
|
251
|
-
class UndefinedUndefined17,
|
252
|
-
def method_missing(sym, *args, &block)method_missing18,
|
253
|
-
def to_sto_s22,
|
254
|
-
def inspectinspect26,
|
255
|
-
def cloneclone30,
|
256
|
-
def coerce(other)coerce34,
|
257
|
-
def self.undefinedundefined43,
|
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
|
258
258
|
|
259
259
|
lib/flexmock/validators.rb,545
|
260
|
-
class FlexMockFlexMock14,
|
261
|
-
class CountValidatorCountValidator19,
|
262
|
-
def initialize(expectation, limit)initialize20,
|
263
|
-
def eligible?(n)eligible?28,
|
264
|
-
class ExactCountValidator < CountValidatorExactCountValidator36,
|
265
|
-
def validate(n)validate39,
|
266
|
-
class AtLeastCountValidator < CountValidatorAtLeastCountValidator48,
|
267
|
-
def validate(n)validate51,
|
268
|
-
def eligible?(n)eligible?61,
|
269
|
-
class AtMostCountValidator < CountValidatorAtMostCountValidator69,
|
270
|
-
def validate(n)validate71,
|
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
271
|
|
272
272
|
lib/flexmock.rb,0
|
273
273
|
|
274
|
-
print_tree.rb,47
|
275
|
-
def print_tree(tree, indent=0)print_tree5,44
|
276
|
-
|
277
|
-
test/asserts.rb,139
|
278
|
-
class FlexMockFlexMock12,312
|
279
|
-
module FailureAssertionFailureAssertion15,368
|
280
|
-
def assert_failure(message=nil)assert_failure21,567
|
281
|
-
|
282
274
|
test/redirect_error.rb,114
|
283
275
|
class FlexMockFlexMock3,20
|
284
276
|
module RedirectErrorRedirectError4,35
|
@@ -286,500 +278,506 @@ class FlexMockFlexMock3,20
|
|
286
278
|
|
287
279
|
test/rspec_integration/integration_spec.rb,0
|
288
280
|
|
289
|
-
test/test_aliasing.rb,
|
290
|
-
class FlexMockFlexMock
|
291
|
-
module StubsAndExpectsStubsAndExpects
|
292
|
-
def expects(*args)expects
|
293
|
-
def stubs(*args)stubs
|
294
|
-
module MockContainerMockContainer
|
295
|
-
class PartialMockProxyPartialMockProxy
|
296
|
-
class AliasingTest < Test::Unit::TestCaseAliasingTest
|
297
|
-
def test_mockingtest_mocking
|
298
|
-
def test_once_mockingtest_once_mocking
|
299
|
-
def test_twice_mockingtest_twice_mocking
|
300
|
-
def test_stubbingtest_stubbing
|
301
|
-
def test_partialtest_partial
|
281
|
+
test/test_aliasing.rb,521
|
282
|
+
class FlexMockFlexMock5,48
|
283
|
+
module StubsAndExpectsStubsAndExpects6,63
|
284
|
+
def expects(*args)expects7,88
|
285
|
+
def stubs(*args)stubs12,234
|
286
|
+
module MockContainerMockContainer17,298
|
287
|
+
class PartialMockProxyPartialMockProxy24,407
|
288
|
+
class AliasingTest < Test::Unit::TestCaseAliasingTest30,510
|
289
|
+
def test_mockingtest_mocking33,582
|
290
|
+
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
|
302
294
|
|
303
295
|
test/test_container_methods.rb,1111
|
304
|
-
class TestFlexmockContainerMethods < Test::Unit::TestCaseTestFlexmockContainerMethods
|
305
|
-
def test_simple_mock_creationtest_simple_mock_creation
|
306
|
-
def test_mock_with_nametest_mock_with_name
|
307
|
-
def test_mock_with_symbol_nametest_mock_with_symbol_name
|
308
|
-
def test_mock_with_hashtest_mock_with_hash
|
309
|
-
def test_mock_with_name_and_hashtest_mock_with_name_and_hash
|
310
|
-
def test_mock_with_name_hash_and_blocktest_mock_with_name_hash_and_block
|
311
|
-
def test_basic_stubtest_basic_stub
|
312
|
-
def test_basic_stub_with_nametest_basic_stub_with_name
|
313
|
-
def test_stub_with_quick_definitionstest_stub_with_quick_definitions
|
314
|
-
def test_stub_with_name_quick_definitionstest_stub_with_name_quick_definitions
|
315
|
-
def test_stubs_are_auto_verifiedtest_stubs_are_auto_verified
|
316
|
-
def test_stubbing_a_stringtest_stubbing_a_string
|
317
|
-
def test_multiple_stubs_work_with_same_partial_mock_proxytest_multiple_stubs_work_with_same_partial_mock_proxy
|
318
|
-
def test_multiple_stubs_layer_behaviortest_multiple_stubs_layer_behavior
|
319
|
-
|
320
|
-
test/test_default_framework_adapter.rb,
|
321
|
-
class TestFlexmockDefaultFrameworkAdapter < Test::Unit::TestCaseTestFlexmockDefaultFrameworkAdapter
|
322
|
-
def setupsetup
|
323
|
-
def test_assert_block_raises_exception
|
324
|
-
def test_assert_block_doesnt_raise_exceptiontest_assert_block_doesnt_raise_exception
|
325
|
-
def test_assert_equal_doesnt_raise_exceptiontest_assert_equal_doesnt_raise_exception
|
326
|
-
def test_assert_equal_can_failtest_assert_equal_can_fail
|
327
|
-
|
328
|
-
test/test_demeter_mocking.rb,
|
329
|
-
class TestDemeterMocking < Test::Unit::TestCaseTestDemeterMocking
|
330
|
-
def test_demeter_mockingtest_demeter_mocking
|
331
|
-
def test_demeter_mocking_with_operatorstest_demeter_mocking_with_operators
|
332
|
-
def test_demeter_mocking_with_multiple_operatorstest_demeter_mocking_with_multiple_operators
|
333
|
-
def test_multiple_demeter_mocks_on_same_branch_is_oktest_multiple_demeter_mocks_on_same_branch_is_ok
|
334
|
-
def test_multi_level_deep_demeter_violationtest_multi_level_deep_demeter_violation
|
335
|
-
def test_final_method_can_have_multiple_expecationstest_final_method_can_have_multiple_expecations
|
336
|
-
def test_conflicting_mock_declarations_raises_an_errortest_conflicting_mock_declarations_raises_an_error
|
337
|
-
def test_conflicting_mock_declarations_in_reverse_order_does_not_raise_errortest_conflicting_mock_declarations_in_reverse_order_does_not_raise_error
|
338
|
-
def test_preestablishing_existing_mock_is_oktest_preestablishing_existing_mock_is_ok
|
339
|
-
def test_quick_defs_can_use_demeter_mockingtest_quick_defs_can_use_demeter_mocking
|
340
|
-
def test_quick_defs_can_use_demeter_mocking_twotest_quick_defs_can_use_demeter_mocking_two
|
341
|
-
def test_errors_on_ill_formed_method_namestest_errors_on_ill_formed_method_names
|
342
|
-
def test_no_errors_on_well_formed_method_namestest_no_errors_on_well_formed_method_names
|
343
|
-
def test_readme_example_1test_readme_example_1
|
344
|
-
def test_readme_example_2test_readme_example_2
|
345
|
-
def test_readme_example_3test_readme_example_3
|
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
|
321
|
+
class TestDemeterMocking < Test::Unit::TestCaseTestDemeterMocking5,48
|
322
|
+
def test_demeter_mockingtest_demeter_mocking8,126
|
323
|
+
def test_demeter_mocking_with_operatorstest_demeter_mocking_with_operators16,353
|
324
|
+
def test_demeter_mocking_with_multiple_operatorstest_demeter_mocking_with_multiple_operators25,642
|
325
|
+
def test_multiple_demeter_mocks_on_same_branch_is_oktest_multiple_demeter_mocks_on_same_branch_is_ok31,803
|
326
|
+
def test_multi_level_deep_demeter_violationtest_multi_level_deep_demeter_violation39,1095
|
327
|
+
def test_final_method_can_have_multiple_expecationstest_final_method_can_have_multiple_expecations45,1280
|
328
|
+
def test_conflicting_mock_declarations_raises_an_errortest_conflicting_mock_declarations_raises_an_error53,1571
|
329
|
+
def test_conflicting_mock_declarations_in_reverse_order_does_not_raise_errortest_conflicting_mock_declarations_in_reverse_order_does_not_raise_error65,1976
|
330
|
+
def test_preestablishing_existing_mock_is_oktest_preestablishing_existing_mock_is_ok75,2320
|
331
|
+
def test_quick_defs_can_use_demeter_mockingtest_quick_defs_can_use_demeter_mocking83,2583
|
332
|
+
def test_quick_defs_can_use_demeter_mocking_twotest_quick_defs_can_use_demeter_mocking_two93,2892
|
333
|
+
def test_errors_on_ill_formed_method_namestest_errors_on_ill_formed_method_names100,3121
|
334
|
+
def test_no_errors_on_well_formed_method_namestest_no_errors_on_well_formed_method_names109,3375
|
335
|
+
def test_readme_example_1test_readme_example_1118,3593
|
336
|
+
def test_readme_example_2test_readme_example_2128,3967
|
337
|
+
def test_readme_example_3test_readme_example_3134,4168
|
346
338
|
|
347
339
|
test/test_deprecated_methods.rb,2237
|
348
|
-
class TestFlexMock < Test::Unit::TestCaseTestFlexMock
|
349
|
-
def s(&block)s
|
350
|
-
def setupsetup
|
351
|
-
def test_handletest_handle
|
352
|
-
def test_handle_no_blocktest_handle_no_block
|
353
|
-
def test_called_with_blocktest_called_with_block
|
354
|
-
def test_return_valuetest_return_value
|
355
|
-
def test_handle_missing_methodtest_handle_missing_method
|
356
|
-
def test_ignore_missing_methodtest_ignore_missing_method
|
357
|
-
def test_good_countstest_good_counts
|
358
|
-
def test_bad_countstest_bad_counts
|
359
|
-
def test_undetermined_countstest_undetermined_counts
|
360
|
-
def test_zero_countstest_zero_counts
|
361
|
-
def test_file_io_with_usetest_file_io_with_use
|
362
|
-
def count_lines(stream)count_lines
|
363
|
-
def test_usetest_use
|
364
|
-
def test_failures_during_usetest_failures_during_use
|
365
|
-
def test_sequential_valuestest_sequential_values
|
366
|
-
def test_respond_to_returns_false_for_non_handled_methodstest_respond_to_returns_false_for_non_handled_methods
|
367
|
-
def test_respond_to_returns_true_for_explicit_methodstest_respond_to_returns_true_for_explicit_methods
|
368
|
-
def test_respond_to_returns_true_for_missing_methods_when_ignoring_missingtest_respond_to_returns_true_for_missing_methods_when_ignoring_missing
|
369
|
-
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_should
|
370
|
-
def test_method_proc_raises_error_on_unknowntest_method_proc_raises_error_on_unknown
|
371
|
-
def test_method_returns_callable_proctest_method_returns_callable_proc
|
372
|
-
def test_method_returns_do_nothing_proc_for_missing_methodstest_method_returns_do_nothing_proc_for_missing_methods
|
373
|
-
class TestDeprecatedOrderingMethods < Test::Unit::TestCaseTestDeprecatedOrderingMethods
|
374
|
-
def test_deprecated_ordering_methodstest_deprecated_ordering_methods
|
375
|
-
class TestAnyInstance < Test::Unit::TestCaseTestAnyInstance
|
376
|
-
class DogDog
|
377
|
-
def barkbark
|
378
|
-
def test_any_instance_still_works_for_backwards_compatibilitytest_any_instance_still_works_for_backwards_compatibility
|
379
|
-
|
380
|
-
test/test_examples_from_readme.rb,
|
381
|
-
class TemperatureSamplerTemperatureSampler
|
382
|
-
def initialize(sensor)initialize
|
383
|
-
def average_tempaverage_temp
|
384
|
-
class TestTemperatureSampler < Test::Unit::TestCaseTestTemperatureSampler
|
385
|
-
def test_tempurature_samplertest_tempurature_sampler
|
386
|
-
class TestExamplesFromReadme < Test::Unit::TestCaseTestExamplesFromReadme
|
387
|
-
def test_simple_return_valuestest_simple_return_values
|
388
|
-
def test_returning_an_undefined_valuetest_returning_an_undefined_value
|
389
|
-
def test_dbtest_db
|
390
|
-
def test_query_and_updatetest_query_and_update
|
391
|
-
def test_ordered_queriestest_ordered_queries
|
392
|
-
def test_ordered_queries_in_record_modetest_ordered_queries_in_record_mode
|
393
|
-
def test_build_xmltest_build_xml
|
394
|
-
def known_good_way_to_build_xml(rec)known_good_way_to_build_xml
|
395
|
-
def new_way_to_build_xml(rec)new_way_to_build_xml
|
396
|
-
def test_multiple_getstest_multiple_gets
|
397
|
-
def test_an_important_messagetest_an_important_message
|
398
|
-
class QuoteServiceQuoteService
|
399
|
-
class PortfolioPortfolio
|
400
|
-
def valuevalue
|
401
|
-
def test_portfolio_valuetest_portfolio_value
|
402
|
-
|
403
|
-
test/test_extended_should_receive.rb,
|
404
|
-
module ExtendedShouldReceiveTestsExtendedShouldReceiveTests
|
405
|
-
def test_accepts_expectation_hashtest_accepts_expectation_hash
|
406
|
-
def test_accepts_list_of_methodstest_accepts_list_of_methods
|
407
|
-
def test_contraints_apply_to_all_expectationstest_contraints_apply_to_all_expectations
|
408
|
-
def test_count_contraints_apply_to_all_expectationstest_count_contraints_apply_to_all_expectations
|
409
|
-
def test_multiple_should_receives_are_allowedtest_multiple_should_receives_are_allowed
|
410
|
-
class TestExtendedShouldReceiveOnFullMocks < Test::Unit::TestCaseTestExtendedShouldReceiveOnFullMocks
|
411
|
-
def setupsetup
|
412
|
-
class TestExtendedShouldReceiveOnPartialMockProxies < Test::Unit::TestCaseTestExtendedShouldReceiveOnPartialMockProxies
|
413
|
-
def setupsetup
|
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
|
414
406
|
|
415
407
|
test/test_flexmodel.rb,528
|
416
|
-
class DummyModelDummyModel
|
417
|
-
class ChildModel < DummyModelChildModel
|
418
|
-
class TestFlexModel < Test::Unit::TestCaseTestFlexModel
|
419
|
-
def test_initial_conditionstest_initial_conditions
|
420
|
-
def test_classifying_mock_modelstest_classifying_mock_models
|
421
|
-
def test_mock_models_have_different_idstest_mock_models_have_different_ids
|
422
|
-
def test_mock_models_can_have_quick_defstest_mock_models_can_have_quick_defs
|
423
|
-
def test_mock_models_can_have_blockstest_mock_models_can_have_blocks
|
408
|
+
class DummyModelDummyModel5,48
|
409
|
+
class ChildModel < DummyModelChildModel8,70
|
410
|
+
class TestFlexModel < Test::Unit::TestCaseTestFlexModel12,176
|
411
|
+
def test_initial_conditionstest_initial_conditions15,249
|
412
|
+
def test_classifying_mock_modelstest_classifying_mock_models27,650
|
413
|
+
def test_mock_models_have_different_idstest_mock_models_have_different_ids37,897
|
414
|
+
def test_mock_models_can_have_quick_defstest_mock_models_can_have_quick_defs43,1048
|
415
|
+
def test_mock_models_can_have_blockstest_mock_models_can_have_blocks48,1188
|
424
416
|
|
425
417
|
test/test_naming.rb,816
|
426
|
-
class TestNaming < Test::Unit::TestCaseTestNaming
|
427
|
-
def test_nametest_name
|
428
|
-
def test_name_in_no_handler_found_errortest_name_in_no_handler_found_error
|
429
|
-
def test_name_in_received_count_errortest_name_in_received_count_error
|
430
|
-
def test_naming_with_usetest_naming_with_use
|
431
|
-
def test_naming_with_multiple_mocks_in_usetest_naming_with_multiple_mocks_in_use
|
432
|
-
def test_inspect_returns_reasonable_nametest_inspect_returns_reasonable_name
|
433
|
-
def test_mock_can_override_inspecttest_mock_can_override_inspect
|
434
|
-
class DummyDummy
|
435
|
-
def inspectinspect
|
436
|
-
def test_partial_mocks_use_original_inspecttest_partial_mocks_use_original_inspect
|
437
|
-
def test_partial_mocks_can_override_inspecttest_partial_mocks_can_override_inspect
|
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
|
438
430
|
|
439
431
|
test/test_new_instances.rb,2271
|
440
|
-
class TestNewInstances < Test::Unit::TestCaseTestNewInstances
|
441
|
-
class DogDog
|
442
|
-
def barkbark
|
443
|
-
def wagwag
|
444
|
-
def self.makemake
|
445
|
-
class CatCat
|
446
|
-
def initialize(name, &block)initialize
|
447
|
-
class ConnectionConnection
|
448
|
-
def initialize(*args)initialize
|
449
|
-
def send(args)send
|
450
|
-
def post(args)post
|
451
|
-
def test_new_instances_allows_stubbing_of_existing_methodstest_new_instances_allows_stubbing_of_existing_methods
|
452
|
-
def test_new_instances_stubs_still_have_existing_methodstest_new_instances_stubs_still_have_existing_methods
|
453
|
-
def test_new_instances_will_pass_args_to_newtest_new_instances_will_pass_args_to_new
|
454
|
-
def test_new_gets_block_after_restubbingtest_new_gets_block_after_restubbing
|
455
|
-
def test_new_instances_stub_verification_happens_on_teardowntest_new_instances_stub_verification_happens_on_teardown
|
456
|
-
def test_new_instances_reports_error_on_non_classestest_new_instances_reports_error_on_non_classes
|
457
|
-
def test_does_not_by_default_stub_objects_created_with_allocatetest_does_not_by_default_stub_objects_created_with_allocate
|
458
|
-
def test_can_explicitly_stub_objects_created_with_allocatetest_can_explicitly_stub_objects_created_with_allocate
|
459
|
-
def test_can_stub_objects_created_with_arbitrary_class_methodstest_can_stub_objects_created_with_arbitrary_class_methods
|
460
|
-
def test_stubbing_arbitrary_class_methods_leaves_new_alonetest_stubbing_arbitrary_class_methods_leaves_new_alone
|
461
|
-
def test_stubbing_new_and_allocate_doesnt_double_stub_objects_on_newtest_stubbing_new_and_allocate_doesnt_double_stub_objects_on_new
|
462
|
-
def test_blocks_on_new_do_not_have_stubs_installedtest_blocks_on_new_do_not_have_stubs_installed
|
463
|
-
def test_new_instances_accept_chained_expectationstest_new_instances_accept_chained_expectations
|
464
|
-
def test_fancy_use_of_chained_should_receivedtest_fancy_use_of_chained_should_received
|
465
|
-
def test_writable_accessorstest_writable_accessors
|
466
|
-
def test_ordering_can_be_specifiedtest_ordering_can_be_specified
|
467
|
-
def test_ordering_can_be_specified_in_groupstest_ordering_can_be_specified_in_groups
|
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
|
468
460
|
|
469
461
|
test/test_partial_mock.rb,4962
|
470
|
-
class TestStubbing < Test::Unit::TestCaseTestStubbing
|
471
|
-
class DogDog
|
472
|
-
def barkbark
|
473
|
-
def Dog.createcreate
|
474
|
-
class DogPlus < DogDogPlus
|
475
|
-
def should_receiveshould_receive
|
476
|
-
def new_instancesnew_instances
|
477
|
-
def by_defaultby_default
|
478
|
-
def test_stub_command_add_behavior_to_arbitrary_objectstest_stub_command_add_behavior_to_arbitrary_objects
|
479
|
-
def test_stub_command_can_configure_via_blocktest_stub_command_can_configure_via_block
|
480
|
-
def test_stubbed_methods_can_take_blockstest_stubbed_methods_can_take_blocks
|
481
|
-
def test_multiple_stubs_on_the_same_object_reuse_the_same_partial_mocktest_multiple_stubs_on_the_same_object_reuse_the_same_partial_mock
|
482
|
-
def test_multiple_methods_can_be_stubbedtest_multiple_methods_can_be_stubbed
|
483
|
-
def test_original_behavior_can_be_restoredtest_original_behavior_can_be_restored
|
484
|
-
def test_original_missing_behavior_can_be_restoredtest_original_missing_behavior_can_be_restored
|
485
|
-
def test_multiple_stubs_on_single_method_can_be_restored_missing_methodtest_multiple_stubs_on_single_method_can_be_restored_missing_method
|
486
|
-
def test_original_behavior_is_restored_when_multiple_methods_are_mockedtest_original_behavior_is_restored_when_multiple_methods_are_mocked
|
487
|
-
def test_original_behavior_is_restored_on_class_objectstest_original_behavior_is_restored_on_class_objects
|
488
|
-
def test_original_behavior_is_restored_on_singleton_methodstest_original_behavior_is_restored_on_singleton_methods
|
489
|
-
def obj.hi() :hello endhi
|
490
|
-
def test_original_behavior_is_restored_on_singleton_methods_with_multiple_stubstest_original_behavior_is_restored_on_singleton_methods_with_multiple_stubs
|
491
|
-
def obj.hi(n) "hello#{n}" endhi
|
492
|
-
def test_original_behavior_is_restored_on_nonsingleton_methods_with_multiple_stubstest_original_behavior_is_restored_on_nonsingleton_methods_with_multiple_stubs
|
493
|
-
def test_stubbing_file_shouldnt_break_writingtest_stubbing_file_shouldnt_break_writing
|
494
|
-
def test_original_behavior_is_restored_even_when_errorstest_original_behavior_is_restored_even_when_errors
|
495
|
-
def m.flexmock_verify() endflexmock_verify
|
496
|
-
def test_not_calling_stubbed_method_is_an_errortest_not_calling_stubbed_method_is_an_error
|
497
|
-
def test_mock_is_verified_when_the_stub_is_verifiedtest_mock_is_verified_when_the_stub_is_verified
|
498
|
-
def test_stub_can_have_explicit_nametest_stub_can_have_explicit_name
|
499
|
-
def test_unamed_stub_will_use_default_naming_conventiontest_unamed_stub_will_use_default_naming_convention
|
500
|
-
def test_partials_can_be_defined_in_a_blocktest_partials_can_be_defined_in_a_block
|
501
|
-
def test_partials_defining_block_return_real_obj_not_proxytest_partials_defining_block_return_real_obj_not_proxy
|
502
|
-
def test_partial_mocks_always_return_domain_objecttest_partial_mocks_always_return_domain_object
|
503
|
-
def test_domain_objects_do_not_have_mock_methodstest_domain_objects_do_not_have_mock_methods
|
504
|
-
def test_partial_mocks_have_mock_methodstest_partial_mocks_have_mock_methods
|
505
|
-
def test_partial_mocks_do_not_have_mock_methods_after_teardowntest_partial_mocks_do_not_have_mock_methods_after_teardown
|
506
|
-
def test_partial_mocks_with_mock_method_singleton_colision_have_original_defs_restoredtest_partial_mocks_with_mock_method_singleton_colision_have_original_defs_restored
|
507
|
-
def dog.mock() :original endmock
|
508
|
-
class MockColisionMockColision
|
509
|
-
def mockmock
|
510
|
-
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_restored
|
511
|
-
def test_safe_partial_mocks_do_not_support_mock_methodstest_safe_partial_mocks_do_not_support_mock_methods
|
512
|
-
def test_safe_partial_mocks_require_blocktest_safe_partial_mocks_require_block
|
513
|
-
def test_safe_partial_mocks_are_actually_mockedtest_safe_partial_mocks_are_actually_mocked
|
514
|
-
def test_should_receive_does_not_override_preexisting_deftest_should_receive_does_not_override_preexisting_def
|
515
|
-
def test_should_receive_does_override_should_receive_preexisting_deftest_should_receive_does_override_should_receive_preexisting_def
|
516
|
-
class LiarLiar
|
517
|
-
def respond_to?(method_name)respond_to?
|
518
|
-
def test_liar_actually_liestest_liar_actually_lies
|
519
|
-
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_there
|
520
|
-
class ValueObjectValueObject
|
521
|
-
def initialize(val)initialize
|
522
|
-
def ==(other)==
|
523
|
-
def test_partial_mocks_in_the_presense_of_equal_definitiontest_partial_mocks_in_the_presense_of_equal_definition
|
524
|
-
|
525
|
-
test/test_rails_view_stub.rb,
|
526
|
-
module ViewTestsViewTests6,
|
527
|
-
def test_view_mocks_as_stubtest_view_mocks_as_stub7,
|
528
|
-
def test_fails_if_no_rendertest_fails_if_no_render12,
|
529
|
-
def test_view_mocks_with_expectationtest_view_mocks_with_expectation19,
|
530
|
-
def test_view_mocks_with_expectation_fails_with_different_templatetest_view_mocks_with_expectation_fails_with_different_template24,
|
531
|
-
def test_view_mocks_with_expectation_and_multiple_templatestest_view_mocks_with_expectation_and_multiple_templates32,
|
532
|
-
def pretend_to_be_rails_version(version)pretend_to_be_rails_version39,
|
533
|
-
class TestRailsViewStubForVersionsUpTo_1_2_4 < Test::Unit::TestCaseTestRailsViewStubForVersionsUpTo_1_2_445,
|
534
|
-
def setupsetup49,
|
535
|
-
def render(*names)render56,
|
536
|
-
class TestRailsViewStubForVersionsAfter_1_2_4 < Test::Unit::TestCaseTestRailsViewStubForVersionsAfter_1_2_470,
|
537
|
-
def setupsetup74,
|
538
|
-
def render(*names)render82,
|
539
|
-
class TestRailsViewStubForVersionsAfter_2_0_2 < Test::Unit::TestCaseTestRailsViewStubForVersionsAfter_2_0_297,
|
540
|
-
def setupsetup101,
|
541
|
-
def render(*names)render109,
|
542
|
-
class FlexMockFlexMock123,
|
543
|
-
module MockContainerMockContainer124,
|
544
|
-
module RailsRails125,
|
545
|
-
module VERSIONVERSION126,
|
546
|
-
class TestRailsVersion < Test::Unit::TestCaseTestRailsVersion133,
|
547
|
-
def test_rails_version_to_get_code_coveragetest_rails_version_to_get_code_coverage135,
|
548
|
-
module ActionViewActionView142,
|
549
|
-
class BaseBase143,
|
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
|
518
|
+
module ViewTestsViewTests6,86
|
519
|
+
def test_view_mocks_as_stubtest_view_mocks_as_stub7,103
|
520
|
+
def test_fails_if_no_rendertest_fails_if_no_render12,197
|
521
|
+
def test_view_mocks_with_expectationtest_view_mocks_with_expectation19,331
|
522
|
+
def test_view_mocks_with_expectation_fails_with_different_templatetest_view_mocks_with_expectation_fails_with_different_template24,435
|
523
|
+
def test_view_mocks_with_expectation_and_multiple_templatestest_view_mocks_with_expectation_and_multiple_templates32,644
|
524
|
+
def pretend_to_be_rails_version(version)pretend_to_be_rails_version39,820
|
525
|
+
class TestRailsViewStubForVersionsUpTo_1_2_4 < Test::Unit::TestCaseTestRailsViewStubForVersionsUpTo_1_2_445,1015
|
526
|
+
def setupsetup49,1133
|
527
|
+
def render(*names)render56,1362
|
528
|
+
class TestRailsViewStubForVersionsAfter_1_2_4 < Test::Unit::TestCaseTestRailsViewStubForVersionsAfter_1_2_470,1640
|
529
|
+
def setupsetup74,1759
|
530
|
+
def render(*names)render82,2032
|
531
|
+
class TestRailsViewStubForVersionsAfter_2_0_2 < Test::Unit::TestCaseTestRailsViewStubForVersionsAfter_2_0_297,2334
|
532
|
+
def setupsetup101,2453
|
533
|
+
def render(*names)render109,2728
|
534
|
+
class FlexMockFlexMock123,2983
|
535
|
+
module MockContainerMockContainer124,2998
|
536
|
+
module RailsRails125,3021
|
537
|
+
module VERSIONVERSION126,3038
|
538
|
+
class TestRailsVersion < Test::Unit::TestCaseTestRailsVersion133,3107
|
539
|
+
def test_rails_version_to_get_code_coveragetest_rails_version_to_get_code_coverage135,3182
|
540
|
+
module ActionViewActionView142,3280
|
541
|
+
class BaseBase143,3298
|
550
542
|
|
551
543
|
test/test_record_mode.rb,1339
|
552
|
-
class TestRecordMode < Test::Unit::TestCaseTestRecordMode
|
553
|
-
def test_recording_mode_workstest_recording_mode_works
|
554
|
-
def test_arguments_are_passed_to_recording_mode_blocktest_arguments_are_passed_to_recording_mode_block
|
555
|
-
def test_recording_mode_handles_multiple_returnstest_recording_mode_handles_multiple_returns
|
556
|
-
def test_recording_mode_does_not_specify_ordertest_recording_mode_does_not_specify_order
|
557
|
-
def test_recording_mode_gets_block_args_tootest_recording_mode_gets_block_args_too
|
558
|
-
def test_recording_mode_should_validate_args_with_equalstest_recording_mode_should_validate_args_with_equals
|
559
|
-
def test_recording_mode_should_allow_arg_contraint_validationtest_recording_mode_should_allow_arg_contraint_validation
|
560
|
-
def test_recording_mode_should_handle_multiplicity_contraintstest_recording_mode_should_handle_multiplicity_contraints
|
561
|
-
def test_strict_record_mode_requires_exact_argument_matchestest_strict_record_mode_requires_exact_argument_matches
|
562
|
-
def test_strict_record_mode_requires_exact_orderingtest_strict_record_mode_requires_exact_ordering
|
563
|
-
def test_strict_record_mode_requires_oncetest_strict_record_mode_requires_once
|
564
|
-
def test_strict_record_mode_can_not_failtest_strict_record_mode_can_not_fail
|
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
|
565
557
|
|
566
558
|
test/test_samples.rb,2164
|
567
|
-
class TestSamples < Test::Unit::TestCaseTestSamples
|
568
|
-
def test_file_iotest_file_io
|
569
|
-
def count_lines(file)count_lines
|
570
|
-
class TestUndefined < Test::Unit::TestCaseTestUndefined
|
571
|
-
def test_undefined_valuestest_undefined_values
|
572
|
-
class TestSimple < Test::Unit::TestCaseTestSimple
|
573
|
-
def test_simple_mocktest_simple_mock
|
574
|
-
class TestDog < Test::Unit::TestCaseTestDog
|
575
|
-
def test_dog_wagstest_dog_wags
|
576
|
-
class WooferWoofer
|
577
|
-
class DogDog
|
578
|
-
def initializeinitialize
|
579
|
-
def barkbark
|
580
|
-
def wagwag
|
581
|
-
class TestDogBarking < Test::Unit::TestCaseTestDogBarking
|
582
|
-
def setupsetup
|
583
|
-
def test_dogtest_dog
|
584
|
-
class TestDogBarkingWithNewInstances < Test::Unit::TestCaseTestDogBarkingWithNewInstances
|
585
|
-
def setupsetup
|
586
|
-
def test_dogtest_dog
|
587
|
-
class TestDefaults < Test::Unit::TestCaseTestDefaults
|
588
|
-
def setupsetup
|
589
|
-
def test_something_where_bark_must_be_called_oncetest_something_where_bark_must_be_called_once
|
590
|
-
class TestDemeter < Test::Unit::TestCaseTestDemeter
|
591
|
-
def test_manual_mockingtest_manual_mocking
|
592
|
-
def test_demetertest_demeter
|
593
|
-
class TestDb < Test::Unit::TestCaseTestDb
|
594
|
-
def test_dbtest_db
|
595
|
-
class TestDb < Test::Unit::TestCaseTestDb
|
596
|
-
def test_query_and_updatetest_query_and_update
|
597
|
-
def test_ordered_queriestest_ordered_queries
|
598
|
-
def test_ordered_queries_in_record_modetest_ordered_queries_in_record_mode
|
599
|
-
def known_good_way_to_build_xml(builder)known_good_way_to_build_xml
|
600
|
-
def new_way_to_build_xml(builder)new_way_to_build_xml
|
601
|
-
def test_build_xmltest_build_xml
|
602
|
-
class TestMoreSamples < Test::Unit::TestCaseTestMoreSamples
|
603
|
-
def test_multiple_getstest_multiple_gets
|
604
|
-
def test_an_important_messagetest_an_important_message
|
605
|
-
class QuoteServiceQuoteService
|
606
|
-
class PortfolioPortfolio
|
607
|
-
def initializeinitialize
|
608
|
-
def valuevalue
|
609
|
-
def test_portfolio_valuetest_portfolio_value
|
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
|
602
|
+
|
603
|
+
test/test_setup.rb,180
|
604
|
+
class FlexMockFlexMock7,91
|
605
|
+
module TestCaseTestCase8,106
|
606
|
+
def assertion_failed_errorassertion_failed_error9,124
|
607
|
+
def assert_failure(message=nil)assert_failure16,378
|
610
608
|
|
611
609
|
test/test_should_ignore_missing.rb,1173
|
612
|
-
class TestShouldIgnoreMissing < Test::Unit::TestCaseTestShouldIgnoreMissing
|
613
|
-
def setupsetup
|
614
|
-
def test_mocks_do_not_respond_to_undefined_methodstest_mocks_do_not_respond_to_undefined_methods
|
615
|
-
def test_mocks_do_respond_to_defined_methodstest_mocks_do_respond_to_defined_methods
|
616
|
-
def test_mocks_do_respond_to_any_method_when_ignoring_missingtest_mocks_do_respond_to_any_method_when_ignoring_missing
|
617
|
-
def test_ignored_methods_return_undefinedtest_ignored_methods_return_undefined
|
618
|
-
def test_undefined_mocking_with_argumentstest_undefined_mocking_with_arguments
|
619
|
-
def test_method_chains_with_undefined_are_self_preservingtest_method_chains_with_undefined_are_self_preserving
|
620
|
-
def test_method_proc_raises_error_on_unknowntest_method_proc_raises_error_on_unknown
|
621
|
-
def test_method_returns_callable_proctest_method_returns_callable_proc
|
622
|
-
def test_not_calling_method_proc_will_fail_count_constraintstest_not_calling_method_proc_will_fail_count_constraints
|
623
|
-
def test_method_returns_do_nothing_proc_for_missing_methodstest_method_returns_do_nothing_proc_for_missing_methods
|
624
|
-
|
625
|
-
test/test_should_receive.rb,
|
626
|
-
def mock_top_level_functionmock_top_level_function
|
627
|
-
module KernelKernel
|
628
|
-
def mock_kernel_functionmock_kernel_function
|
629
|
-
class CatCat
|
630
|
-
def purrpurr
|
631
|
-
def meowmeow
|
632
|
-
class TestFlexMockShoulds < Test::Unit::TestCaseTestFlexMockShoulds
|
633
|
-
def test_defaultstest_defaults
|
634
|
-
def test_returns_with_valuetest_returns_with_value
|
635
|
-
def test_returns_with_multiple_valuestest_returns_with_multiple_values
|
636
|
-
def test_multiple_returnstest_multiple_returns
|
637
|
-
def test_returns_with_blocktest_returns_with_block
|
638
|
-
def test_block_example_from_readmetest_block_example_from_readme
|
639
|
-
def test_return_with_and_without_block_interleavedtest_return_with_and_without_block_interleaved
|
640
|
-
def test_and_returns_aliastest_and_returns_alias
|
641
|
-
def test_and_return_undefinedtest_and_return_undefined
|
642
|
-
def test_and_yield_will_continue_to_yield_the_same_valuetest_and_yield_will_continue_to_yield_the_same_value
|
643
|
-
def test_and_yield_with_multiple_values_yields_the_valuestest_and_yield_with_multiple_values_yields_the_values
|
644
|
-
def test_multiple_yields_are_done_sequentiallytest_multiple_yields_are_done_sequentially
|
645
|
-
def test_failure_if_no_block_giventest_failure_if_no_block_given
|
646
|
-
def test_failure_different_return_value_than_yield_returntest_failure_different_return_value_than_yield_return
|
647
|
-
def test_multiple_yieldstest_multiple_yields
|
648
|
-
def test_multiple_yields_will_yield_the_last_value_settest_multiple_yields_will_yield_the_last_value_set
|
649
|
-
def test_yielding_then_not_yielding_and_then_yielding_againtest_yielding_then_not_yielding_and_then_yielding_again
|
650
|
-
def test_yields_syntaxtest_yields_syntax
|
651
|
-
class MyError < RuntimeErrorMyError
|
652
|
-
def test_and_raises_with_exception_class_throws_exceptiontest_and_raises_with_exception_class_throws_exception
|
653
|
-
def test_and_raises_with_arguments_throws_exception_made_with_argstest_and_raises_with_arguments_throws_exception_made_with_args
|
654
|
-
def test_and_raises_with_a_specific_exception_throws_the_exceptiontest_and_raises_with_a_specific_exception_throws_the_exception
|
655
|
-
def test_raises_is_an_alias_for_and_raisetest_raises_is_an_alias_for_and_raise
|
656
|
-
def test_multiple_and_raise_clauses_will_be_done_sequentiallytest_multiple_and_raise_clauses_will_be_done_sequentially
|
657
|
-
def test_and_throw_will_throw_a_symboltest_and_throw_will_throw_a_symbol
|
658
|
-
def test_and_throw_with_expression_will_throwtest_and_throw_with_expression_will_throw
|
659
|
-
def test_throws_is_an_alias_for_and_throwtest_throws_is_an_alias_for_and_throw
|
660
|
-
def test_multiple_throws_will_be_done_sequentiallytest_multiple_throws_will_be_done_sequentially
|
661
|
-
def test_multiple_expectationstest_multiple_expectations
|
662
|
-
def test_with_no_args_with_no_argstest_with_no_args_with_no_args
|
663
|
-
def test_with_no_args_but_with_argstest_with_no_args_but_with_args
|
664
|
-
def test_with_any_argstest_with_any_args
|
665
|
-
def test_with_any_single_arg_matchingtest_with_any_single_arg_matching
|
666
|
-
def test_with_any_single_arg_nonmatchingtest_with_any_single_arg_nonmatching
|
667
|
-
def test_with_equal_arg_matchingtest_with_equal_arg_matching
|
668
|
-
def test_with_ducktype_arg_matchingtest_with_ducktype_arg_matching
|
669
|
-
def test_with_ducktype_arg_matching_no_matchtest_with_ducktype_arg_matching_no_match
|
670
|
-
def test_with_hash_matchingtest_with_hash_matching
|
671
|
-
def test_with_hash_non_matchingtest_with_hash_non_matching
|
672
|
-
def test_with_equal_arg_nonmatchingtest_with_equal_arg_nonmatching
|
673
|
-
def test_with_arbitrary_arg_matchingtest_with_arbitrary_arg_matching
|
674
|
-
def test_args_matching_with_regextest_args_matching_with_regex
|
675
|
-
def test_arg_matching_with_regex_matching_non_stringtest_arg_matching_with_regex_matching_non_string
|
676
|
-
def test_arg_matching_with_classtest_arg_matching_with_class
|
677
|
-
def test_arg_matching_with_no_matchtest_arg_matching_with_no_match
|
678
|
-
def test_arg_matching_with_string_doesnt_over_matchtest_arg_matching_with_string_doesnt_over_match
|
679
|
-
def test_block_arg_given_to_no_argstest_block_arg_given_to_no_args
|
680
|
-
def test_block_arg_given_to_matching_proctest_block_arg_given_to_matching_proc
|
681
|
-
def test_arg_matching_precedence_when_best_firsttest_arg_matching_precedence_when_best_first
|
682
|
-
def test_arg_matching_precedence_when_best_last_but_still_matches_firsttest_arg_matching_precedence_when_best_last_but_still_matches_first
|
683
|
-
def test_never_and_never_calledtest_never_and_never_called
|
684
|
-
def test_never_and_called_oncetest_never_and_called_once
|
685
|
-
def test_once_called_oncetest_once_called_once
|
686
|
-
def test_once_but_never_calledtest_once_but_never_called
|
687
|
-
def test_once_but_called_twicetest_once_but_called_twice
|
688
|
-
def test_twice_and_called_twicetest_twice_and_called_twice
|
689
|
-
def test_zero_or_more_called_zerotest_zero_or_more_called_zero
|
690
|
-
def test_zero_or_more_called_oncetest_zero_or_more_called_once
|
691
|
-
def test_zero_or_more_called_100test_zero_or_more_called_100
|
692
|
-
def test_timestest_times
|
693
|
-
def test_at_least_called_oncetest_at_least_called_once
|
694
|
-
def test_at_least_but_never_calledtest_at_least_but_never_called
|
695
|
-
def test_at_least_once_but_called_twicetest_at_least_once_but_called_twice
|
696
|
-
def test_at_least_and_exacttest_at_least_and_exact
|
697
|
-
def test_at_most_but_never_calledtest_at_most_but_never_called
|
698
|
-
def test_at_most_called_oncetest_at_most_called_once
|
699
|
-
def test_at_most_called_twicetest_at_most_called_twice
|
700
|
-
def test_at_most_and_at_least_called_nevertest_at_most_and_at_least_called_never
|
701
|
-
def test_at_most_and_at_least_called_oncetest_at_most_and_at_least_called_once
|
702
|
-
def test_at_most_and_at_least_called_twicetest_at_most_and_at_least_called_twice
|
703
|
-
def test_at_most_and_at_least_called_three_timestest_at_most_and_at_least_called_three_times
|
704
|
-
def test_call_counts_only_apply_to_matching_argstest_call_counts_only_apply_to_matching_args
|
705
|
-
def test_call_counts_only_apply_to_matching_args_with_mismatchtest_call_counts_only_apply_to_matching_args_with_mismatch
|
706
|
-
def test_ordered_calls_in_order_will_passtest_ordered_calls_in_order_will_pass
|
707
|
-
def test_ordered_calls_out_of_order_will_failtest_ordered_calls_out_of_order_will_fail
|
708
|
-
def test_order_calls_with_different_arg_lists_and_in_order_will_passtest_order_calls_with_different_arg_lists_and_in_order_will_pass
|
709
|
-
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_fail
|
710
|
-
def test_unordered_calls_do_not_effect_ordered_testingtest_unordered_calls_do_not_effect_ordered_testing
|
711
|
-
def test_ordered_with_multiple_calls_will_passtest_ordered_with_multiple_calls_will_pass
|
712
|
-
def test_grouped_ordering_with_numberstest_grouped_ordering_with_numbers
|
713
|
-
def test_grouped_ordering_with_symbolstest_grouped_ordering_with_symbols
|
714
|
-
def test_explicit_ordering_mixed_with_implicit_ordering_should_not_overlaptest_explicit_ordering_mixed_with_implicit_ordering_should_not_overlap
|
715
|
-
def test_explicit_ordering_with_explicit_misorderstest_explicit_ordering_with_explicit_misorders
|
716
|
-
def test_ordering_with_explicit_no_args_matches_correctlytest_ordering_with_explicit_no_args_matches_correctly
|
717
|
-
def test_ordering_with_any_arg_matching_correctly_matchestest_ordering_with_any_arg_matching_correctly_matches
|
718
|
-
def test_ordering_between_mocks_is_not_normally_definedtest_ordering_between_mocks_is_not_normally_defined
|
719
|
-
def test_ordering_between_mocks_is_honored_for_global_orderingtest_ordering_between_mocks_is_honored_for_global_ordering
|
720
|
-
def test_expectation_formatingtest_expectation_formating
|
721
|
-
def test_multi_expectation_formattingtest_multi_expectation_formatting
|
722
|
-
def test_explicit_ordering_with_limits_allow_multiple_return_valuestest_explicit_ordering_with_limits_allow_multiple_return_values
|
723
|
-
def test_global_methods_can_be_mockedtest_global_methods_can_be_mocked
|
724
|
-
def test_kernel_methods_can_be_mockedtest_kernel_methods_can_be_mocked
|
725
|
-
def test_undefing_kernel_methods_dont_effect_other_mockstest_undefing_kernel_methods_dont_effect_other_mocks
|
726
|
-
def test_expectations_can_by_marked_as_defaulttest_expectations_can_by_marked_as_default
|
727
|
-
def test_default_expectations_are_search_in_the_proper_ordertest_default_expectations_are_search_in_the_proper_order
|
728
|
-
def test_expectations_with_count_constraints_can_by_marked_as_defaulttest_expectations_with_count_constraints_can_by_marked_as_default
|
729
|
-
def test_default_expectations_are_overridden_by_later_expectationstest_default_expectations_are_overridden_by_later_expectations
|
730
|
-
def test_default_expectations_can_be_changed_by_later_expectationstest_default_expectations_can_be_changed_by_later_expectations
|
731
|
-
def test_ordered_default_expectations_can_be_specifiedtest_ordered_default_expectations_can_be_specified
|
732
|
-
def test_ordered_default_expectations_can_be_overriddentest_ordered_default_expectations_can_be_overridden
|
733
|
-
def test_by_default_works_at_mock_leveltest_by_default_works_at_mock_level
|
734
|
-
def test_by_default_at_mock_level_does_nothing_with_no_expectationstest_by_default_at_mock_level_does_nothing_with_no_expectations
|
735
|
-
def test_partial_mocks_can_have_default_expectationstest_partial_mocks_can_have_default_expectations
|
736
|
-
def test_partial_mocks_can_have_default_expectations_overriddentest_partial_mocks_can_have_default_expectations_overridden
|
737
|
-
def test_wicked_and_evil_tricks_with_by_default_are_thwartedtest_wicked_and_evil_tricks_with_by_default_are_thwarted
|
738
|
-
def test_mocks_can_handle_multi_parameter_respond_tostest_mocks_can_handle_multi_parameter_respond_tos
|
739
|
-
def test_can_mock_operatorstest_can_mock_operators
|
740
|
-
def assert_operator(op, &block)assert_operator
|
741
|
-
class TestFlexMockShouldsWithInclude < Test::Unit::TestCaseTestFlexMockShouldsWithInclude
|
742
|
-
def test_include_enables_unqualified_arg_type_referencestest_include_enables_unqualified_arg_type_references
|
743
|
-
class TestFlexMockArgTypesDontLeak < Test::Unit::TestCaseTestFlexMockArgTypesDontLeak
|
744
|
-
def test_unqualified_arg_type_references_are_undefined_by_defaulttest_unqualified_arg_type_references_are_undefined_by_default
|
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
|
745
743
|
|
746
744
|
test/test_tu_integration.rb,1570
|
747
|
-
class TestTuIntegrationFlexMockMethod < Test::Unit::TestCaseTestTuIntegrationFlexMockMethod
|
748
|
-
def test_can_construct_flexmocktest_can_construct_flexmock
|
749
|
-
def test_can_construct_flexmock_with_blocktest_can_construct_flexmock_with_block
|
750
|
-
class TestTuIntegrationMockVerificationInTeardown < Test::Unit::TestCaseTestTuIntegrationMockVerificationInTeardown
|
751
|
-
def teardownteardown
|
752
|
-
def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown
|
753
|
-
class TestTuIntegrationMockVerificationWithoutSetup < Test::Unit::TestCaseTestTuIntegrationMockVerificationWithoutSetup
|
754
|
-
def teardownteardown
|
755
|
-
def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown
|
756
|
-
class TestTuIntegrationMockVerificationForgetfulSetup < Test::Unit::TestCaseTestTuIntegrationMockVerificationForgetfulSetup
|
757
|
-
def teardownteardown
|
758
|
-
def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown
|
759
|
-
class TestTuIntegrationSetupOverridenAndNoMocksOk < Test::Unit::TestCaseTestTuIntegrationSetupOverridenAndNoMocksOk
|
760
|
-
def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown
|
761
|
-
class TestTuIntegrationFailurePreventsVerification < Test::Unit::TestCaseTestTuIntegrationFailurePreventsVerification
|
762
|
-
def test_mock_verification_occurs_during_teardowntest_mock_verification_occurs_during_teardown
|
763
|
-
def simulate_failuresimulate_failure
|
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
|
764
762
|
|
765
763
|
test/test_undefined.rb,873
|
766
|
-
class UndefinedTest < Test::Unit::TestCaseUndefinedTest
|
767
|
-
def test_undefined_method_calls_return_undefinedtest_undefined_method_calls_return_undefined
|
768
|
-
def test_equalstest_equals
|
769
|
-
def test_math_operatorstest_math_operators
|
770
|
-
def test_math_operators_reversedtest_math_operators_reversed
|
771
|
-
def test_comparisonstest_comparisons
|
772
|
-
def test_comparisons_reversedtest_comparisons_reversed
|
773
|
-
def test_base_level_methodstest_base_level_methods
|
774
|
-
def test_cant_create_a_new_undefinedtest_cant_create_a_new_undefined
|
775
|
-
def test_cant_clone_undefinedtest_cant_clone_undefined
|
776
|
-
def test_string_representationstest_string_representations
|
777
|
-
def test_undefined_is_not_niltest_undefined_is_not_nil
|
778
|
-
def assert_undefined(obj)assert_undefined
|
779
|
-
def undefinedundefined
|
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
|
780
778
|
|
781
779
|
test/test_unit_integration/test_auto_test_unit.rb,263
|
782
|
-
class TestFlexmockTestUnit < Test::Unit::TestCaseTestFlexmockTestUnit17,
|
783
|
-
def teardownteardown18,
|
784
|
-
def test_can_create_mockstest_can_create_mocks23,
|
785
|
-
def test_should_fail__mocks_are_auto_verifiedtest_should_fail__mocks_are_auto_verified30,
|
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
|