dchelimsky-rspec 1.1.11.3 → 1.1.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +2 -1
- data/Manifest.txt +6 -5
- data/TODO.txt +10 -2
- data/examples/failing/{failure_in_teardown.rb → failure_in_after.rb} +1 -1
- data/examples/failing/{failure_in_setup.rb → failure_in_before.rb} +1 -1
- data/features/example_groups/autogenerated_docstrings.feature +4 -4
- data/features/example_groups/nested_groups.feature +1 -1
- data/features/support/env.rb +1 -0
- data/lib/adapters/mock_frameworks/flexmock.rb +1 -1
- data/lib/adapters/mock_frameworks/mocha.rb +1 -1
- data/lib/adapters/mock_frameworks/rr.rb +1 -1
- data/lib/adapters/mock_frameworks/rspec.rb +1 -1
- data/lib/spec/example.rb +0 -1
- data/lib/spec/example/example_group_methods.rb +29 -25
- data/lib/spec/expectations.rb +0 -1
- data/lib/spec/matchers.rb +1 -0
- data/lib/spec/matchers/equal.rb +1 -1
- data/lib/spec/matchers/respond_to.rb +33 -8
- data/lib/spec/{expectations → matchers}/wrap_expectation.rb +0 -1
- data/lib/spec/mocks/message_expectation.rb +7 -2
- data/lib/spec/mocks/proxy.rb +1 -1
- data/lib/spec/runner.rb +13 -2
- data/lib/spec/runner/backtrace_tweaker.rb +5 -3
- data/lib/spec/{example → runner}/configuration.rb +3 -3
- data/lib/spec/runner/formatter/html_formatter.rb +14 -11
- data/lib/spec/runner/options.rb +12 -2
- data/lib/spec/runner/spec_parser.rb +3 -2
- data/lib/spec/version.rb +1 -1
- data/rspec.gemspec +4 -4
- data/spec/spec/example/example_group_methods_spec.rb +9 -9
- data/spec/spec/example/example_methods_spec.rb +15 -13
- data/spec/spec/matchers/description_generation_spec.rb +1 -1
- data/spec/spec/matchers/respond_to_spec.rb +71 -9
- data/spec/spec/mocks/stubbed_message_expectations_spec.rb +14 -0
- data/spec/spec/runner/configuration_spec.rb +290 -0
- data/spec/spec/runner/formatter/base_formatter_spec.rb +13 -102
- data/spec/spec/runner/formatter/html_formatted-1.8.6.html +33 -24
- data/spec/spec/runner/formatter/html_formatter_spec.rb +6 -1
- data/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +7 -2
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +33 -30
- data/spec/spec/runner/spec_parser_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +9 -8
- data/spec/spec/example/configuration_spec.rb +0 -296
@@ -0,0 +1,14 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
2
|
+
|
3
|
+
module Spec
|
4
|
+
module Mocks
|
5
|
+
describe "Example with stubbed and then called message" do
|
6
|
+
it "should fail if the message is expected and then subsequently not called again" do
|
7
|
+
mock_obj = mock("mock", :msg => nil)
|
8
|
+
mock_obj.msg
|
9
|
+
mock_obj.should_receive(:msg)
|
10
|
+
lambda { mock_obj.rspec_verify }.should raise_error(Spec::Mocks::MockExpectationError)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,290 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
2
|
+
|
3
|
+
module Spec
|
4
|
+
module Runner
|
5
|
+
describe Configuration do
|
6
|
+
with_sandboxed_options do
|
7
|
+
with_sandboxed_config do
|
8
|
+
describe "#mock_with" do
|
9
|
+
it "should default mock framework to rspec" do
|
10
|
+
config.mock_framework.should =~ /\/adapters\/mock_frameworks\/rspec$/
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should set rspec mocking explicitly" do
|
14
|
+
config.mock_with(:rspec)
|
15
|
+
config.mock_framework.should =~ /\/adapters\/mock_frameworks\/rspec$/
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should set mocha" do
|
19
|
+
config.mock_with(:mocha)
|
20
|
+
config.mock_framework.should =~ /\/adapters\/mock_frameworks\/mocha$/
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should set flexmock" do
|
24
|
+
config.mock_with(:flexmock)
|
25
|
+
config.mock_framework.should =~ /\/adapters\/mock_frameworks\/flexmock$/
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should set rr" do
|
29
|
+
config.mock_with(:rr)
|
30
|
+
config.mock_framework.should =~ /\/adapters\/mock_frameworks\/rr$/
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should set an arbitrary adapter module" do
|
34
|
+
adapter = Module.new
|
35
|
+
config.mock_with(adapter)
|
36
|
+
config.mock_framework.should == adapter
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "#include" do
|
41
|
+
|
42
|
+
before(:each) do
|
43
|
+
@example_group_class = Class.new(ExampleGroup) {}
|
44
|
+
Spec::Example::ExampleGroupFactory.register(:foobar, @example_group_class)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should include the submitted module in ExampleGroup subclasses" do
|
48
|
+
mod = Module.new
|
49
|
+
config.include mod
|
50
|
+
Class.new(@example_group_class).included_modules.should include(mod)
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should scope modules to be included for a specific type" do
|
54
|
+
mod = Module.new
|
55
|
+
config.include mod, :type => :foobar
|
56
|
+
Class.new(@example_group_class).included_modules.should include(mod)
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should not include modules in a type they are not intended for" do
|
60
|
+
mod = Module.new
|
61
|
+
@other_example_group_class = Class.new(ExampleGroup)
|
62
|
+
Spec::Example::ExampleGroupFactory.register(:baz, @other_example_group_class)
|
63
|
+
|
64
|
+
config.include mod, :type => :foobar
|
65
|
+
|
66
|
+
Class.new(@other_example_group_class).included_modules.should_not include(mod)
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "#extend" do
|
72
|
+
|
73
|
+
before(:each) do
|
74
|
+
@example_group_class = Class.new(ExampleGroup) {}
|
75
|
+
Spec::Example::ExampleGroupFactory.register(:foobar, @example_group_class)
|
76
|
+
end
|
77
|
+
|
78
|
+
it "should extend all groups" do
|
79
|
+
mod = Module.new
|
80
|
+
ExampleGroup.should_receive(:extend).with(mod)
|
81
|
+
Spec::Runner.configuration.extend mod
|
82
|
+
end
|
83
|
+
|
84
|
+
it "should extend specified groups" do
|
85
|
+
mod = Module.new
|
86
|
+
@example_group_class.should_receive(:extend).with(mod)
|
87
|
+
Spec::Runner.configuration.extend mod, :type => :foobar
|
88
|
+
end
|
89
|
+
|
90
|
+
it "should not extend non-specified groups" do
|
91
|
+
@other_example_group_class = Class.new(ExampleGroup)
|
92
|
+
Spec::Example::ExampleGroupFactory.register(:baz, @other_example_group_class)
|
93
|
+
|
94
|
+
mod = Module.new
|
95
|
+
@other_example_group_class.should_not_receive(:extend)
|
96
|
+
|
97
|
+
Spec::Runner.configuration.extend mod, :type => :foobar
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
describe "ordering methods: " do
|
104
|
+
|
105
|
+
before(:each) do
|
106
|
+
@special_example_group = Class.new(ExampleGroup).describe("special_example_group")
|
107
|
+
@special_child_example_group = Class.new(@special_example_group).describe("special_child_example_group")
|
108
|
+
@nonspecial_example_group = Class.new(ExampleGroup).describe("nonspecial_example_group")
|
109
|
+
Spec::Example::ExampleGroupFactory.register(:special, @special_example_group)
|
110
|
+
Spec::Example::ExampleGroupFactory.register(:special_child, @special_child_example_group)
|
111
|
+
Spec::Example::ExampleGroupFactory.register(:non_special, @nonspecial_example_group)
|
112
|
+
@example_group = @special_child_example_group.describe "Special Example Group"
|
113
|
+
@unselected_example_group = Class.new(@nonspecial_example_group).describe "Non Special Example Group"
|
114
|
+
end
|
115
|
+
|
116
|
+
describe "#prepend_before" do
|
117
|
+
it "prepends the before block on all instances of the passed in type" do
|
118
|
+
order = []
|
119
|
+
config.prepend_before(:all) do
|
120
|
+
order << :prepend__before_all
|
121
|
+
end
|
122
|
+
config.prepend_before(:all, :type => :special) do
|
123
|
+
order << :special_prepend__before_all
|
124
|
+
end
|
125
|
+
config.prepend_before(:all, :type => :special_child) do
|
126
|
+
order << :special_child_prepend__before_all
|
127
|
+
end
|
128
|
+
config.prepend_before(:each) do
|
129
|
+
order << :prepend__before_each
|
130
|
+
end
|
131
|
+
config.prepend_before(:each, :type => :special) do
|
132
|
+
order << :special_prepend__before_each
|
133
|
+
end
|
134
|
+
config.prepend_before(:each, :type => :special_child) do
|
135
|
+
order << :special_child_prepend__before_each
|
136
|
+
end
|
137
|
+
config.prepend_before(:all, :type => :non_special) do
|
138
|
+
order << :special_prepend__before_all
|
139
|
+
end
|
140
|
+
config.prepend_before(:each, :type => :non_special) do
|
141
|
+
order << :special_prepend__before_each
|
142
|
+
end
|
143
|
+
@example_group.it "calls prepend_before" do
|
144
|
+
end
|
145
|
+
|
146
|
+
@example_group.run(options)
|
147
|
+
order.should == [
|
148
|
+
:prepend__before_all,
|
149
|
+
:special_prepend__before_all,
|
150
|
+
:special_child_prepend__before_all,
|
151
|
+
:prepend__before_each,
|
152
|
+
:special_prepend__before_each,
|
153
|
+
:special_child_prepend__before_each
|
154
|
+
]
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
describe "#append_before" do
|
159
|
+
|
160
|
+
it "calls append_before on the type" do
|
161
|
+
order = []
|
162
|
+
config.append_before(:all) do
|
163
|
+
order << :append_before_all
|
164
|
+
end
|
165
|
+
config.append_before(:all, :type => :special) do
|
166
|
+
order << :special_append_before_all
|
167
|
+
end
|
168
|
+
config.append_before(:all, :type => :special_child) do
|
169
|
+
order << :special_child_append_before_all
|
170
|
+
end
|
171
|
+
config.append_before(:each) do
|
172
|
+
order << :append_before_each
|
173
|
+
end
|
174
|
+
config.append_before(:each, :type => :special) do
|
175
|
+
order << :special_append_before_each
|
176
|
+
end
|
177
|
+
config.append_before(:each, :type => :special_child) do
|
178
|
+
order << :special_child_append_before_each
|
179
|
+
end
|
180
|
+
config.append_before(:all, :type => :non_special) do
|
181
|
+
order << :special_append_before_all
|
182
|
+
end
|
183
|
+
config.append_before(:each, :type => :non_special) do
|
184
|
+
order << :special_append_before_each
|
185
|
+
end
|
186
|
+
@example_group.it "calls append_before" do
|
187
|
+
end
|
188
|
+
|
189
|
+
@example_group.run(options)
|
190
|
+
order.should == [
|
191
|
+
:append_before_all,
|
192
|
+
:special_append_before_all,
|
193
|
+
:special_child_append_before_all,
|
194
|
+
:append_before_each,
|
195
|
+
:special_append_before_each,
|
196
|
+
:special_child_append_before_each
|
197
|
+
]
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
describe "#prepend_after" do
|
202
|
+
|
203
|
+
it "prepends the after block on all instances of the passed in type" do
|
204
|
+
order = []
|
205
|
+
config.prepend_after(:all) do
|
206
|
+
order << :prepend__after_all
|
207
|
+
end
|
208
|
+
config.prepend_after(:all, :type => :special) do
|
209
|
+
order << :special_prepend__after_all
|
210
|
+
end
|
211
|
+
config.prepend_after(:all, :type => :special) do
|
212
|
+
order << :special_child_prepend__after_all
|
213
|
+
end
|
214
|
+
config.prepend_after(:each) do
|
215
|
+
order << :prepend__after_each
|
216
|
+
end
|
217
|
+
config.prepend_after(:each, :type => :special) do
|
218
|
+
order << :special_prepend__after_each
|
219
|
+
end
|
220
|
+
config.prepend_after(:each, :type => :special) do
|
221
|
+
order << :special_child_prepend__after_each
|
222
|
+
end
|
223
|
+
config.prepend_after(:all, :type => :non_special) do
|
224
|
+
order << :special_prepend__after_all
|
225
|
+
end
|
226
|
+
config.prepend_after(:each, :type => :non_special) do
|
227
|
+
order << :special_prepend__after_each
|
228
|
+
end
|
229
|
+
@example_group.it "calls prepend_after" do
|
230
|
+
end
|
231
|
+
|
232
|
+
@example_group.run(options)
|
233
|
+
order.should == [
|
234
|
+
:special_child_prepend__after_each,
|
235
|
+
:special_prepend__after_each,
|
236
|
+
:prepend__after_each,
|
237
|
+
:special_child_prepend__after_all,
|
238
|
+
:special_prepend__after_all,
|
239
|
+
:prepend__after_all
|
240
|
+
]
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
describe "#append_after" do
|
245
|
+
|
246
|
+
it "calls append_after on the type" do
|
247
|
+
order = []
|
248
|
+
config.append_after(:all) do
|
249
|
+
order << :append__after_all
|
250
|
+
end
|
251
|
+
config.append_after(:all, :type => :special) do
|
252
|
+
order << :special_append__after_all
|
253
|
+
end
|
254
|
+
config.append_after(:all, :type => :special_child) do
|
255
|
+
order << :special_child_append__after_all
|
256
|
+
end
|
257
|
+
config.append_after(:each) do
|
258
|
+
order << :append__after_each
|
259
|
+
end
|
260
|
+
config.append_after(:each, :type => :special) do
|
261
|
+
order << :special_append__after_each
|
262
|
+
end
|
263
|
+
config.append_after(:each, :type => :special_child) do
|
264
|
+
order << :special_child_append__after_each
|
265
|
+
end
|
266
|
+
config.append_after(:all, :type => :non_special) do
|
267
|
+
order << :non_special_append_after_all
|
268
|
+
end
|
269
|
+
config.append_after(:each, :type => :non_special) do
|
270
|
+
order << :non_special_append_after_each
|
271
|
+
end
|
272
|
+
@example_group.it "calls append_after" do
|
273
|
+
end
|
274
|
+
|
275
|
+
@example_group.run(options)
|
276
|
+
order.should == [
|
277
|
+
:special_child_append__after_each,
|
278
|
+
:special_append__after_each,
|
279
|
+
:append__after_each,
|
280
|
+
:special_child_append__after_all,
|
281
|
+
:special_append__after_all,
|
282
|
+
:append__after_all
|
283
|
+
]
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
@@ -4,108 +4,19 @@ module Spec
|
|
4
4
|
module Runner
|
5
5
|
module Formatter
|
6
6
|
describe BaseFormatter do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
def matches?(object)
|
21
|
-
@object = object
|
22
|
-
object.respond_to?(@method)
|
23
|
-
end
|
24
|
-
|
25
|
-
def with(arity)
|
26
|
-
WithArity.new(self, @method, arity)
|
27
|
-
end
|
28
|
-
|
29
|
-
class WithArity
|
30
|
-
def initialize(matcher, method, arity)
|
31
|
-
@have_matcher = matcher
|
32
|
-
@method = method
|
33
|
-
@arity = arity
|
34
|
-
end
|
35
|
-
|
36
|
-
def matches?(an_object)
|
37
|
-
@have_matcher.matches?(an_object) && real_arity == @arity
|
38
|
-
end
|
39
|
-
|
40
|
-
def failure_message
|
41
|
-
"#{@have_matcher} should have method :#{@method} with #{argument_arity}, but it had #{real_arity}"
|
42
|
-
end
|
43
|
-
|
44
|
-
def arguments
|
45
|
-
self
|
46
|
-
end
|
47
|
-
|
48
|
-
alias_method :argument, :arguments
|
49
|
-
|
50
|
-
private
|
51
|
-
|
52
|
-
def real_arity
|
53
|
-
@have_matcher.object.method(@method).arity
|
54
|
-
end
|
55
|
-
|
56
|
-
def argument_arity
|
57
|
-
if @arity == 1
|
58
|
-
"1 argument"
|
59
|
-
else
|
60
|
-
"#{@arity} arguments"
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
def have_interface_for(method)
|
67
|
-
HaveInterfaceMatcher.new(method)
|
68
|
-
end
|
69
|
-
|
70
|
-
it "should have start as an interface with one argument"do
|
71
|
-
@formatter.should have_interface_for(:start).with(1).argument
|
72
|
-
end
|
73
|
-
|
74
|
-
it "should have add_example_group as an interface with one argument" do
|
75
|
-
@formatter.should have_interface_for(:add_example_group).with(1).argument
|
76
|
-
end
|
77
|
-
|
78
|
-
it "should have example_started as an interface with one argument" do
|
79
|
-
@formatter.should have_interface_for(:example_started).with(1).argument
|
80
|
-
end
|
81
|
-
|
82
|
-
it "should have example_failed as an interface with three arguments" do
|
83
|
-
@formatter.should have_interface_for(:example_failed).with(3).arguments
|
84
|
-
end
|
85
|
-
|
86
|
-
it "should have example_pending as an interface with three arguments" do
|
87
|
-
@formatter.should have_interface_for(:example_pending).with(3).arguments
|
88
|
-
end
|
89
|
-
|
90
|
-
it "should have start_dump as an interface with zero arguments" do
|
91
|
-
@formatter.should have_interface_for(:start_dump).with(0).arguments
|
92
|
-
end
|
93
|
-
|
94
|
-
it "should have dump_failure as an interface with two arguments" do
|
95
|
-
@formatter.should have_interface_for(:dump_failure).with(2).arguments
|
96
|
-
end
|
97
|
-
|
98
|
-
it "should have dump_summary as an interface with two arguments" do
|
99
|
-
@formatter.should have_interface_for(:dump_failure).with(2).arguments
|
100
|
-
end
|
101
|
-
|
102
|
-
it "should have dump_pending as an interface with zero arguments" do
|
103
|
-
@formatter.should have_interface_for(:dump_pending).with(0).arguments
|
104
|
-
end
|
105
|
-
|
106
|
-
it "should have close as an interface with zero arguments" do
|
107
|
-
@formatter.should have_interface_for(:close).with(0).arguments
|
108
|
-
end
|
7
|
+
subject {BaseFormatter.new(nil, nil)}
|
8
|
+
|
9
|
+
it {should respond_to(:start ).with(1).argument }
|
10
|
+
it {should respond_to(:add_example_group).with(1).argument }
|
11
|
+
it {should respond_to(:example_passed ).with(1).argument }
|
12
|
+
it {should respond_to(:example_started ).with(1).argument }
|
13
|
+
it {should respond_to(:example_failed ).with(3).arguments}
|
14
|
+
it {should respond_to(:example_pending ).with(3).arguments}
|
15
|
+
it {should respond_to(:start_dump ).with(0).arguments}
|
16
|
+
it {should respond_to(:dump_failure ).with(2).arguments}
|
17
|
+
it {should respond_to(:dump_summary ).with(4).arguments}
|
18
|
+
it {should respond_to(:dump_pending ).with(0).arguments}
|
19
|
+
it {should respond_to(:close ).with(0).arguments}
|
109
20
|
end
|
110
21
|
end
|
111
22
|
end
|
@@ -16,9 +16,6 @@
|
|
16
16
|
font-size: 80%;
|
17
17
|
}
|
18
18
|
</style>
|
19
|
-
</head>
|
20
|
-
<body>
|
21
|
-
<div class="rspec-report">
|
22
19
|
<script type="text/javascript">
|
23
20
|
// <![CDATA[
|
24
21
|
function moveProgressBar(percentDone) {
|
@@ -46,7 +43,7 @@ function makeYellow(element_id) {
|
|
46
43
|
</script>
|
47
44
|
<style type="text/css">
|
48
45
|
#rspec-header {
|
49
|
-
background: #65C400; color: #fff;
|
46
|
+
background: #65C400; color: #fff; height: 42px;
|
50
47
|
}
|
51
48
|
|
52
49
|
.rspec-report h1 {
|
@@ -54,15 +51,16 @@ function makeYellow(element_id) {
|
|
54
51
|
padding: 10px;
|
55
52
|
font-family: "Lucida Grande", Helvetica, sans-serif;
|
56
53
|
font-size: 1.8em;
|
54
|
+
float: left;
|
57
55
|
}
|
58
56
|
|
59
57
|
#summary {
|
60
58
|
margin: 0; padding: 5px 10px;
|
61
59
|
font-family: "Lucida Grande", Helvetica, sans-serif;
|
62
60
|
text-align: right;
|
63
|
-
position: absolute;
|
64
61
|
top: 0px;
|
65
62
|
right: 0px;
|
63
|
+
float:right;
|
66
64
|
}
|
67
65
|
|
68
66
|
#summary p {
|
@@ -165,9 +163,14 @@ a {
|
|
165
163
|
}
|
166
164
|
|
167
165
|
</style>
|
166
|
+
</head>
|
167
|
+
<body>
|
168
|
+
<div class="rspec-report">
|
168
169
|
|
169
170
|
<div id="rspec-header">
|
170
|
-
<
|
171
|
+
<div id="label">
|
172
|
+
<h1>RSpec Results</h1>
|
173
|
+
</div>
|
171
174
|
|
172
175
|
<div id="summary">
|
173
176
|
<p id="totals"> </p>
|
@@ -189,9 +192,10 @@ a {
|
|
189
192
|
<div class="failure" id="failure_1">
|
190
193
|
<div class="message"><pre>Mock 'poke me' expected :poke with (any args) once, but received it 0 times</pre></div>
|
191
194
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:13:
|
192
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/
|
193
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
194
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
195
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:40:in `run_with'
|
196
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:30:
|
197
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `chdir'
|
198
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:</pre></div>
|
195
199
|
<pre class="ruby"><code><span class="linenum">11</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">should fail when expected message not received</span><span class="punct">"</span> <span class="keyword">do</span>
|
196
200
|
<span class="linenum">12</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">("</span><span class="string">poke me</span><span class="punct">")</span>
|
197
201
|
<span class="offending"><span class="linenum">13</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_receive</span><span class="punct">(</span><span class="symbol">:poke</span><span class="punct">)</span></span>
|
@@ -205,9 +209,10 @@ a {
|
|
205
209
|
<div class="failure" id="failure_2">
|
206
210
|
<div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
|
207
211
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:22:
|
208
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/
|
209
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
210
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
212
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:40:in `run_with'
|
213
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:30:
|
214
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `chdir'
|
215
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:</pre></div>
|
211
216
|
<pre class="ruby"><code><span class="linenum">20</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_receive</span><span class="punct">(</span><span class="symbol">:three</span><span class="punct">).</span><span class="ident">ordered</span>
|
212
217
|
<span class="linenum">21</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">one</span>
|
213
218
|
<span class="offending"><span class="linenum">22</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">three</span></span>
|
@@ -221,9 +226,10 @@ a {
|
|
221
226
|
<div class="failure" id="failure_3">
|
222
227
|
<div class="message"><pre>Mock 'don't talk to me' expected :any_message_at_all with (no args) 0 times, but received it once</pre></div>
|
223
228
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:29:
|
224
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/
|
225
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
226
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
229
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:40:in `run_with'
|
230
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:30:
|
231
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `chdir'
|
232
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:</pre></div>
|
227
233
|
<pre class="ruby"><code><span class="linenum">27</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">("</span><span class="string">don't talk to me</span><span class="punct">")</span>
|
228
234
|
<span class="linenum">28</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_not_receive</span><span class="punct">(</span><span class="symbol">:any_message_at_all</span><span class="punct">)</span>
|
229
235
|
<span class="offending"><span class="linenum">29</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">any_message_at_all</span></span>
|
@@ -236,9 +242,10 @@ a {
|
|
236
242
|
<div class="failure" id="failure_4">
|
237
243
|
<div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
|
238
244
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:33:
|
239
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/
|
240
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
241
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
245
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:40:in `run_with'
|
246
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:30:
|
247
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `chdir'
|
248
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:</pre></div>
|
242
249
|
<pre class="ruby"><code><span class="linenum">31</span>
|
243
250
|
<span class="linenum">32</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">has a bug we need to fix</span><span class="punct">"</span> <span class="keyword">do</span>
|
244
251
|
<span class="offending"><span class="linenum">33</span> <span class="ident">pending</span> <span class="punct">"</span><span class="string">here is the bug</span><span class="punct">"</span> <span class="keyword">do</span></span>
|
@@ -266,9 +273,10 @@ Diff:
|
|
266
273
|
framework for Ruby
|
267
274
|
</pre></div>
|
268
275
|
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:13:
|
269
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/
|
270
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
271
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
276
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:40:in `run_with'
|
277
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:30:
|
278
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `chdir'
|
279
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:</pre></div>
|
272
280
|
<pre class="ruby"><code><span class="linenum">11</span><span class="ident">framework</span> <span class="keyword">for</span> <span class="constant">Ruby</span>
|
273
281
|
<span class="linenum">12</span><span class="constant">EOF</span>
|
274
282
|
<span class="offending"><span class="linenum">13</span> <span class="ident">usa</span><span class="punct">.</span><span class="ident">should</span> <span class="punct">==</span> <span class="ident">uk</span></span>
|
@@ -297,9 +305,10 @@ Diff:
|
|
297
305
|
>
|
298
306
|
</pre></div>
|
299
307
|
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:
|
300
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/
|
301
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
302
|
-
/Users/david/projects/ruby/rspec/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
308
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:40:in `run_with'
|
309
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:30:
|
310
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `chdir'
|
311
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:</pre></div>
|
303
312
|
<pre class="ruby"><code><span class="linenum">32</span> <span class="ident">expected</span> <span class="punct">=</span> <span class="constant">Animal</span><span class="punct">.</span><span class="ident">new</span> <span class="punct">"</span><span class="string">bob</span><span class="punct">",</span> <span class="punct">"</span><span class="string">giraffe</span><span class="punct">"</span>
|
304
313
|
<span class="linenum">33</span> <span class="ident">actual</span> <span class="punct">=</span> <span class="constant">Animal</span><span class="punct">.</span><span class="ident">new</span> <span class="punct">"</span><span class="string">bob</span><span class="punct">",</span> <span class="punct">"</span><span class="string">tortoise</span><span class="punct">"</span>
|
305
314
|
<span class="offending"><span class="linenum">34</span> <span class="ident">expected</span><span class="punct">.</span><span class="ident">should</span> <span class="ident">eql</span><span class="punct">(</span><span class="ident">actual</span><span class="punct">)</span></span>
|