dchelimsky-rspec 1.1.11.4 → 1.1.11.5
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 +4 -2
- data/Manifest.txt +7 -3
- data/Rakefile +1 -1
- data/examples/ruby1.9.compatibility/access_to_constants_spec.rb +86 -0
- data/features/before_and_after_blocks/before_and_after_blocks.feature +168 -0
- data/features/step_definitions/running_rspec.rb +7 -1
- data/lib/spec.rb +1 -0
- data/lib/spec/dsl/main.rb +2 -1
- data/lib/spec/example/before_and_after_hooks.rb +20 -2
- data/lib/spec/example/example_group_factory.rb +11 -0
- data/lib/spec/example/example_group_methods.rb +32 -35
- data/lib/spec/example/shared_example_group.rb +0 -4
- data/lib/spec/matchers/respond_to.rb +1 -2
- data/lib/spec/matchers/wrap_expectation.rb +1 -1
- data/lib/spec/mocks/proxy.rb +1 -1
- data/lib/spec/ruby.rb +9 -0
- data/lib/spec/runner/configuration.rb +6 -7
- data/lib/spec/runner/formatter/nested_text_formatter.rb +2 -2
- data/lib/spec/runner/heckle_runner.rb +58 -56
- data/lib/spec/runner/options.rb +9 -4
- data/lib/spec/version.rb +1 -1
- data/rspec.gemspec +5 -5
- data/spec/spec/dsl/main_spec.rb +21 -1
- data/spec/spec/example/example_group_methods_spec.rb +51 -0
- data/spec/spec/example/example_methods_spec.rb +1 -33
- data/spec/spec/matchers/have_spec.rb +2 -2
- data/spec/spec/mocks/nil_expectation_warning_spec.rb +1 -1
- data/spec/spec/mocks/stub_spec.rb +6 -0
- data/spec/spec/runner/configuration_spec.rb +11 -0
- data/spec/spec/runner/drb_command_line_spec.rb +4 -4
- data/spec/spec/runner/formatter/base_text_formatter_spec.rb +1 -0
- data/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +5 -5
- data/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +3 -3
- data/spec/spec/runner/formatter/html_formatted-1.8.6.html +24 -24
- data/spec/spec/runner/formatter/html_formatted-1.8.7.html +379 -0
- data/spec/spec/runner/formatter/html_formatted-1.9.1.html +379 -0
- data/spec/spec/runner/formatter/html_formatter_spec.rb +9 -13
- data/spec/spec/runner/formatter/nested_text_formatter_spec.rb +4 -4
- data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +3 -3
- data/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +8 -12
- data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +4 -4
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +18 -18
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.7.html +373 -0
- data/spec/spec/runner/formatter/text_mate_formatted-1.9.1.html +373 -0
- data/spec/spec/runner/heckler_spec.rb +16 -9
- data/spec/spec/runner/option_parser_spec.rb +0 -2
- data/spec/spec/runner/options_spec.rb +7 -2
- data/spec/spec/runner/reporter_spec.rb +4 -4
- data/spec/spec_helper.rb +4 -0
- metadata +10 -6
- data/features/configuration/before_blocks.feature +0 -21
- data/resources/spec/before_blocks_example.rb +0 -32
- data/spec/spec/example/example_runner_spec.rb +0 -194
@@ -576,6 +576,57 @@ module Spec
|
|
576
576
|
example_group.example_group_backtrace.join("\n").should include("#{__FILE__}:#{__LINE__-3}")
|
577
577
|
end
|
578
578
|
end
|
579
|
+
|
580
|
+
describe "#before" do
|
581
|
+
it "stores before(:each) blocks" do
|
582
|
+
example_group = Class.new(ExampleGroup) {}
|
583
|
+
block = lambda {}
|
584
|
+
example_group.before(:each, &block)
|
585
|
+
example_group.before_each_parts.should include(block)
|
586
|
+
end
|
587
|
+
|
588
|
+
it "stores before(:all) blocks" do
|
589
|
+
example_group = Class.new(ExampleGroup) {}
|
590
|
+
block = lambda {}
|
591
|
+
example_group.before(:all, &block)
|
592
|
+
example_group.before_all_parts.should include(block)
|
593
|
+
end
|
594
|
+
|
595
|
+
it "stores before(:suite) blocks" do
|
596
|
+
example_group = Class.new(ExampleGroup) {}
|
597
|
+
parts = []
|
598
|
+
ExampleGroupMethods.stub!(:before_suite_parts).and_return(parts)
|
599
|
+
block = lambda {}
|
600
|
+
example_group.before(:suite, &block)
|
601
|
+
example_group.before_suite_parts.should include(block)
|
602
|
+
end
|
603
|
+
end
|
604
|
+
|
605
|
+
|
606
|
+
describe "#after" do
|
607
|
+
it "stores after(:each) blocks" do
|
608
|
+
example_group = Class.new(ExampleGroup) {}
|
609
|
+
block = lambda {}
|
610
|
+
example_group.after(:each, &block)
|
611
|
+
example_group.after_each_parts.should include(block)
|
612
|
+
end
|
613
|
+
|
614
|
+
it "stores after(:all) blocks" do
|
615
|
+
example_group = Class.new(ExampleGroup) {}
|
616
|
+
block = lambda {}
|
617
|
+
example_group.after(:all, &block)
|
618
|
+
example_group.after_all_parts.should include(block)
|
619
|
+
end
|
620
|
+
|
621
|
+
it "stores after(:suite) blocks" do
|
622
|
+
example_group = Class.new(ExampleGroup) {}
|
623
|
+
parts = []
|
624
|
+
ExampleGroupMethods.stub!(:after_suite_parts).and_return(parts)
|
625
|
+
block = lambda {}
|
626
|
+
example_group.after(:suite, &block)
|
627
|
+
example_group.after_suite_parts.should include(block)
|
628
|
+
end
|
629
|
+
end
|
579
630
|
|
580
631
|
end
|
581
632
|
end
|
@@ -49,38 +49,6 @@ module Spec
|
|
49
49
|
ExampleGroup.instance_variable_set("@after_all_parts", [])
|
50
50
|
end
|
51
51
|
|
52
|
-
it "should pass before and after callbacks to all ExampleGroup subclasses" do
|
53
|
-
ExampleGroup.before(:suite) do
|
54
|
-
ExampleGroup.count.should == 1
|
55
|
-
end
|
56
|
-
|
57
|
-
ExampleGroup.before(:all) do
|
58
|
-
ExampleGroup.count.should == 2
|
59
|
-
end
|
60
|
-
|
61
|
-
ExampleGroup.before(:each) do
|
62
|
-
ExampleGroup.count.should == 3
|
63
|
-
end
|
64
|
-
|
65
|
-
ExampleGroup.after(:each) do
|
66
|
-
ExampleGroup.count.should == 4
|
67
|
-
end
|
68
|
-
|
69
|
-
ExampleGroup.after(:all) do
|
70
|
-
ExampleGroup.count.should == 5
|
71
|
-
end
|
72
|
-
|
73
|
-
ExampleGroup.after(:suite) do
|
74
|
-
ExampleGroup.count.should == 6
|
75
|
-
end
|
76
|
-
|
77
|
-
Class.new(ExampleGroup) do
|
78
|
-
it "should use ExampleMethods callbacks" do end
|
79
|
-
end
|
80
|
-
@options.run_examples
|
81
|
-
ExampleGroup.count.should == 7
|
82
|
-
end
|
83
|
-
|
84
52
|
describe "eval_block" do
|
85
53
|
before(:each) do
|
86
54
|
@example_group = Class.new(ExampleGroup)
|
@@ -129,7 +97,7 @@ module Spec
|
|
129
97
|
@example.eval_block
|
130
98
|
end
|
131
99
|
|
132
|
-
error.pending_caller.should
|
100
|
+
error.pending_caller.should =~ /#{file}:#{line_number}/
|
133
101
|
end
|
134
102
|
end
|
135
103
|
end
|
@@ -10,9 +10,9 @@ share_as :HaveSpecHelper do
|
|
10
10
|
owner
|
11
11
|
end
|
12
12
|
before(:each) do
|
13
|
-
unless defined?(ActiveSupport::Inflector)
|
13
|
+
unless defined?(::ActiveSupport::Inflector)
|
14
14
|
@active_support_was_not_defined
|
15
|
-
module ActiveSupport
|
15
|
+
module ::ActiveSupport
|
16
16
|
class Inflector
|
17
17
|
def self.pluralize(string)
|
18
18
|
string.to_s + 's'
|
@@ -6,7 +6,7 @@ module Spec
|
|
6
6
|
describe "an expectation set on nil" do
|
7
7
|
|
8
8
|
it "should issue a warning with file and line number information" do
|
9
|
-
expected_warning =
|
9
|
+
expected_warning = %r%An expectation of :foo was set on nil. Called from #{__FILE__}:#{__LINE__+3}(:in `block \(2 levels\) in <module:Mocks>')?. Use allow_message_expectations_on_nil to disable warnings.%
|
10
10
|
Kernel.should_receive(:warn).with(expected_warning)
|
11
11
|
|
12
12
|
nil.should_receive(:foo)
|
@@ -137,6 +137,12 @@ module Spec
|
|
137
137
|
@stub.foo("bar")
|
138
138
|
@stub.foo("baz")
|
139
139
|
end
|
140
|
+
|
141
|
+
it "calculates return value by executing block passed to #and_return" do
|
142
|
+
@mock.stub!(:something).with("a","b","c").and_return { |a,b,c| c+b+a }
|
143
|
+
@mock.something("a","b","c").should == "cba"
|
144
|
+
@mock.rspec_verify
|
145
|
+
end
|
140
146
|
end
|
141
147
|
|
142
148
|
describe "A method stub with args" do
|
@@ -65,6 +65,17 @@ module Spec
|
|
65
65
|
|
66
66
|
Class.new(@other_example_group_class).included_modules.should_not include(mod)
|
67
67
|
end
|
68
|
+
|
69
|
+
it "accepts an Array of types" do
|
70
|
+
mod = Module.new
|
71
|
+
@other_example_group_class = Class.new(ExampleGroup)
|
72
|
+
Spec::Example::ExampleGroupFactory.register(:baz, @other_example_group_class)
|
73
|
+
|
74
|
+
config.include mod, :type => [:foobar, :baz]
|
75
|
+
|
76
|
+
Class.new(@example_group_class).included_modules.should include(mod)
|
77
|
+
Class.new(@other_example_group_class).included_modules.should include(mod)
|
78
|
+
end
|
68
79
|
|
69
80
|
end
|
70
81
|
|
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../../spec_helper.rb'
|
|
3
3
|
module Spec
|
4
4
|
module Runner
|
5
5
|
describe DrbCommandLine, "without running local server" do
|
6
|
-
unless
|
6
|
+
unless jruby?
|
7
7
|
it "should print error when there is no running local server" do
|
8
8
|
err = StringIO.new
|
9
9
|
out = StringIO.new
|
@@ -17,7 +17,7 @@ module Spec
|
|
17
17
|
|
18
18
|
describe "with local server" do
|
19
19
|
|
20
|
-
class CommandLineForSpec
|
20
|
+
class ::CommandLineForSpec
|
21
21
|
def self.run(argv, stderr, stdout)
|
22
22
|
orig_options = Spec::Runner.options
|
23
23
|
tmp_options = OptionParser.parse(argv, stderr, stdout)
|
@@ -28,9 +28,9 @@ module Spec
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
unless
|
31
|
+
unless jruby?
|
32
32
|
before(:all) do
|
33
|
-
DRb.start_service("druby://127.0.0.1:8989", CommandLineForSpec)
|
33
|
+
DRb.start_service("druby://127.0.0.1:8989", ::CommandLineForSpec)
|
34
34
|
@@drb_example_file_counter = 0
|
35
35
|
end
|
36
36
|
|
@@ -16,10 +16,10 @@ module Spec
|
|
16
16
|
|
17
17
|
it "should add example name for each failure" do
|
18
18
|
formatter.add_example_group(Class.new(ExampleGroup).describe("b 1"))
|
19
|
-
formatter.example_failed("e 1", nil, Reporter::Failure.new(nil, RuntimeError.new))
|
19
|
+
formatter.example_failed("e 1", nil, Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
20
20
|
formatter.add_example_group(Class.new(ExampleGroup).describe("b 2"))
|
21
|
-
formatter.example_failed("e 2", nil, Reporter::Failure.new(nil, RuntimeError.new))
|
22
|
-
formatter.example_failed("e 3", nil, Reporter::Failure.new(nil, RuntimeError.new))
|
21
|
+
formatter.example_failed("e 2", nil, Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
22
|
+
formatter.example_failed("e 3", nil, Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
23
23
|
io.string.should include("b 1")
|
24
24
|
io.string.should include("b 2")
|
25
25
|
end
|
@@ -30,13 +30,13 @@ module Spec
|
|
30
30
|
grand_child_example_group = Class.new(child_example_group).describe("GrandChild")
|
31
31
|
|
32
32
|
formatter.add_example_group(grand_child_example_group)
|
33
|
-
formatter.example_failed("failure", nil, Reporter::Failure.new(nil, RuntimeError.new))
|
33
|
+
formatter.example_failed("failure", nil, ::Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
34
34
|
io.string.should == "Parent#child_method GrandChild\n"
|
35
35
|
end
|
36
36
|
|
37
37
|
it "should remove druby url, which is used by Spec::Distributed" do
|
38
38
|
@formatter.add_example_group(Class.new(ExampleGroup).describe("something something (druby://99.99.99.99:99)"))
|
39
|
-
@formatter.example_failed("e 1", nil, Reporter::Failure.new(nil, RuntimeError.new))
|
39
|
+
@formatter.example_failed("e 1", nil, ::Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
40
40
|
io.string.should == "something something\n"
|
41
41
|
end
|
42
42
|
end
|
@@ -16,10 +16,10 @@ module Spec
|
|
16
16
|
example_group_2 = Class.new(example_group_1).describe("B")
|
17
17
|
|
18
18
|
@formatter.add_example_group(example_group_1)
|
19
|
-
@formatter.example_failed(example_group_1.it("a1"){}, nil, Reporter::Failure.new(nil, RuntimeError.new))
|
19
|
+
@formatter.example_failed(example_group_1.it("a1"){}, nil, ::Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
20
20
|
@formatter.add_example_group(example_group_2)
|
21
|
-
@formatter.example_failed(example_group_2.it("b2"){}, nil, Reporter::Failure.new(nil, RuntimeError.new))
|
22
|
-
@formatter.example_failed(example_group_2.it("b3"){}, nil, Reporter::Failure.new(nil, RuntimeError.new))
|
21
|
+
@formatter.example_failed(example_group_2.it("b2"){}, nil, ::Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
22
|
+
@formatter.example_failed(example_group_2.it("b3"){}, nil, ::Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
23
23
|
@io.string.should eql(<<-EOF
|
24
24
|
A a1
|
25
25
|
A B b2
|
@@ -192,10 +192,10 @@ a {
|
|
192
192
|
<div class="failure" id="failure_1">
|
193
193
|
<div class="message"><pre>Mock 'poke me' expected :poke with (any args) once, but received it 0 times</pre></div>
|
194
194
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:13:
|
195
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:
|
196
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
197
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
198
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/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:44:in `run_with'
|
196
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
197
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
198
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
199
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>
|
200
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>
|
201
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>
|
@@ -209,10 +209,10 @@ a {
|
|
209
209
|
<div class="failure" id="failure_2">
|
210
210
|
<div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
|
211
211
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:22:
|
212
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:
|
213
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
214
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
215
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/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:44:in `run_with'
|
213
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
214
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
215
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
216
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>
|
217
217
|
<span class="linenum">21</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">one</span>
|
218
218
|
<span class="offending"><span class="linenum">22</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">three</span></span>
|
@@ -226,10 +226,10 @@ a {
|
|
226
226
|
<div class="failure" id="failure_3">
|
227
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>
|
228
228
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:29:
|
229
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:
|
230
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
231
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
232
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/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:44:in `run_with'
|
230
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
231
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
232
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
233
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>
|
234
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>
|
235
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>
|
@@ -242,10 +242,10 @@ a {
|
|
242
242
|
<div class="failure" id="failure_4">
|
243
243
|
<div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
|
244
244
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:33:
|
245
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:
|
246
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
247
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
248
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/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:44:in `run_with'
|
246
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
247
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
248
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
249
249
|
<pre class="ruby"><code><span class="linenum">31</span>
|
250
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>
|
251
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>
|
@@ -273,10 +273,10 @@ Diff:
|
|
273
273
|
framework for Ruby
|
274
274
|
</pre></div>
|
275
275
|
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:13:
|
276
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:
|
277
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
278
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
279
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/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:44:in `run_with'
|
277
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
278
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
279
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
280
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>
|
281
281
|
<span class="linenum">12</span><span class="constant">EOF</span>
|
282
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>
|
@@ -305,10 +305,10 @@ Diff:
|
|
305
305
|
>
|
306
306
|
</pre></div>
|
307
307
|
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:
|
308
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:
|
309
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
310
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:
|
311
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/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:44:in `run_with'
|
309
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
310
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
311
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
312
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>
|
313
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>
|
314
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>
|
@@ -0,0 +1,379 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
6
|
+
<head>
|
7
|
+
<title>RSpec results</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
9
|
+
<meta http-equiv="Expires" content="-1" />
|
10
|
+
<meta http-equiv="Pragma" content="no-cache" />
|
11
|
+
<style type="text/css">
|
12
|
+
body {
|
13
|
+
margin: 0;
|
14
|
+
padding: 0;
|
15
|
+
background: #fff;
|
16
|
+
font-size: 80%;
|
17
|
+
}
|
18
|
+
</style>
|
19
|
+
<script type="text/javascript">
|
20
|
+
// <![CDATA[
|
21
|
+
function moveProgressBar(percentDone) {
|
22
|
+
document.getElementById("rspec-header").style.width = percentDone +"%";
|
23
|
+
}
|
24
|
+
function makeRed(element_id) {
|
25
|
+
document.getElementById(element_id).style.background = '#C40D0D';
|
26
|
+
document.getElementById(element_id).style.color = '#FFFFFF';
|
27
|
+
}
|
28
|
+
|
29
|
+
function makeYellow(element_id) {
|
30
|
+
if (element_id == "rspec-header" && document.getElementById(element_id).style.background != '#C40D0D')
|
31
|
+
{
|
32
|
+
document.getElementById(element_id).style.background = '#FAF834';
|
33
|
+
document.getElementById(element_id).style.color = '#000000';
|
34
|
+
}
|
35
|
+
else
|
36
|
+
{
|
37
|
+
document.getElementById(element_id).style.background = '#FAF834';
|
38
|
+
document.getElementById(element_id).style.color = '#000000';
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
// ]]>
|
43
|
+
</script>
|
44
|
+
<style type="text/css">
|
45
|
+
#rspec-header {
|
46
|
+
background: #65C400; color: #fff; height: 42px;
|
47
|
+
}
|
48
|
+
|
49
|
+
.rspec-report h1 {
|
50
|
+
margin: 0px 10px 0px 10px;
|
51
|
+
padding: 10px;
|
52
|
+
font-family: "Lucida Grande", Helvetica, sans-serif;
|
53
|
+
font-size: 1.8em;
|
54
|
+
float: left;
|
55
|
+
}
|
56
|
+
|
57
|
+
#summary {
|
58
|
+
margin: 0; padding: 5px 10px;
|
59
|
+
font-family: "Lucida Grande", Helvetica, sans-serif;
|
60
|
+
text-align: right;
|
61
|
+
top: 0px;
|
62
|
+
right: 0px;
|
63
|
+
float:right;
|
64
|
+
}
|
65
|
+
|
66
|
+
#summary p {
|
67
|
+
margin: 0 0 0 2px;
|
68
|
+
}
|
69
|
+
|
70
|
+
#summary #totals {
|
71
|
+
font-size: 1.2em;
|
72
|
+
}
|
73
|
+
|
74
|
+
.example_group {
|
75
|
+
margin: 0 10px 5px;
|
76
|
+
background: #fff;
|
77
|
+
}
|
78
|
+
|
79
|
+
dl {
|
80
|
+
margin: 0; padding: 0 0 5px;
|
81
|
+
font: normal 11px "Lucida Grande", Helvetica, sans-serif;
|
82
|
+
}
|
83
|
+
|
84
|
+
dt {
|
85
|
+
padding: 3px;
|
86
|
+
background: #65C400;
|
87
|
+
color: #fff;
|
88
|
+
font-weight: bold;
|
89
|
+
}
|
90
|
+
|
91
|
+
dd {
|
92
|
+
margin: 5px 0 5px 5px;
|
93
|
+
padding: 3px 3px 3px 18px;
|
94
|
+
}
|
95
|
+
|
96
|
+
dd.spec.passed {
|
97
|
+
border-left: 5px solid #65C400;
|
98
|
+
border-bottom: 1px solid #65C400;
|
99
|
+
background: #DBFFB4; color: #3D7700;
|
100
|
+
}
|
101
|
+
|
102
|
+
dd.spec.failed {
|
103
|
+
border-left: 5px solid #C20000;
|
104
|
+
border-bottom: 1px solid #C20000;
|
105
|
+
color: #C20000; background: #FFFBD3;
|
106
|
+
}
|
107
|
+
|
108
|
+
dd.spec.not_implemented {
|
109
|
+
border-left: 5px solid #FAF834;
|
110
|
+
border-bottom: 1px solid #FAF834;
|
111
|
+
background: #FCFB98; color: #131313;
|
112
|
+
}
|
113
|
+
|
114
|
+
dd.spec.pending_fixed {
|
115
|
+
border-left: 5px solid #0000C2;
|
116
|
+
border-bottom: 1px solid #0000C2;
|
117
|
+
color: #0000C2; background: #D3FBFF;
|
118
|
+
}
|
119
|
+
|
120
|
+
.backtrace {
|
121
|
+
color: #000;
|
122
|
+
font-size: 12px;
|
123
|
+
}
|
124
|
+
|
125
|
+
a {
|
126
|
+
color: #BE5C00;
|
127
|
+
}
|
128
|
+
|
129
|
+
/* Ruby code, style similar to vibrant ink */
|
130
|
+
.ruby {
|
131
|
+
font-size: 12px;
|
132
|
+
font-family: monospace;
|
133
|
+
color: white;
|
134
|
+
background-color: black;
|
135
|
+
padding: 0.1em 0 0.2em 0;
|
136
|
+
}
|
137
|
+
|
138
|
+
.ruby .keyword { color: #FF6600; }
|
139
|
+
.ruby .constant { color: #339999; }
|
140
|
+
.ruby .attribute { color: white; }
|
141
|
+
.ruby .global { color: white; }
|
142
|
+
.ruby .module { color: white; }
|
143
|
+
.ruby .class { color: white; }
|
144
|
+
.ruby .string { color: #66FF00; }
|
145
|
+
.ruby .ident { color: white; }
|
146
|
+
.ruby .method { color: #FFCC00; }
|
147
|
+
.ruby .number { color: white; }
|
148
|
+
.ruby .char { color: white; }
|
149
|
+
.ruby .comment { color: #9933CC; }
|
150
|
+
.ruby .symbol { color: white; }
|
151
|
+
.ruby .regex { color: #44B4CC; }
|
152
|
+
.ruby .punct { color: white; }
|
153
|
+
.ruby .escape { color: white; }
|
154
|
+
.ruby .interp { color: white; }
|
155
|
+
.ruby .expr { color: white; }
|
156
|
+
|
157
|
+
.ruby .offending { background-color: gray; }
|
158
|
+
.ruby .linenum {
|
159
|
+
width: 75px;
|
160
|
+
padding: 0.1em 1em 0.2em 0;
|
161
|
+
color: #000000;
|
162
|
+
background-color: #FFFBD3;
|
163
|
+
}
|
164
|
+
|
165
|
+
</style>
|
166
|
+
</head>
|
167
|
+
<body>
|
168
|
+
<div class="rspec-report">
|
169
|
+
|
170
|
+
<div id="rspec-header">
|
171
|
+
<div id="label">
|
172
|
+
<h1>RSpec Results</h1>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
<div id="summary">
|
176
|
+
<p id="totals"> </p>
|
177
|
+
<p id="duration"> </p>
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
<div class="results">
|
182
|
+
<div class="example_group">
|
183
|
+
<dl>
|
184
|
+
<dt id="example_group_1">Mocker</dt>
|
185
|
+
<script type="text/javascript">moveProgressBar('5.8');</script>
|
186
|
+
<dd class="spec passed"><span class="passed_spec_name">should be able to call mock()</span></dd>
|
187
|
+
<script type="text/javascript">makeRed('rspec-header');</script>
|
188
|
+
<script type="text/javascript">makeRed('example_group_1');</script>
|
189
|
+
<script type="text/javascript">moveProgressBar('11.7');</script>
|
190
|
+
<dd class="spec failed">
|
191
|
+
<span class="failed_spec_name">should fail when expected message not received</span>
|
192
|
+
<div class="failure" id="failure_1">
|
193
|
+
<div class="message"><pre>Mock 'poke me' expected :poke with (any args) once, but received it 0 times</pre></div>
|
194
|
+
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:13:
|
195
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
|
196
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
197
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
198
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
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>
|
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>
|
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>
|
202
|
+
<span class="linenum">14</span> <span class="keyword">end</span>
|
203
|
+
<span class="linenum">15</span> </code></pre>
|
204
|
+
</div>
|
205
|
+
</dd>
|
206
|
+
<script type="text/javascript">moveProgressBar('17.6');</script>
|
207
|
+
<dd class="spec failed">
|
208
|
+
<span class="failed_spec_name">should fail when messages are received out of order</span>
|
209
|
+
<div class="failure" id="failure_2">
|
210
|
+
<div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
|
211
|
+
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:22:
|
212
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
|
213
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
214
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
215
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
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>
|
217
|
+
<span class="linenum">21</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">one</span>
|
218
|
+
<span class="offending"><span class="linenum">22</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">three</span></span>
|
219
|
+
<span class="linenum">23</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">two</span>
|
220
|
+
<span class="linenum">24</span> <span class="keyword">end</span></code></pre>
|
221
|
+
</div>
|
222
|
+
</dd>
|
223
|
+
<script type="text/javascript">moveProgressBar('23.5');</script>
|
224
|
+
<dd class="spec failed">
|
225
|
+
<span class="failed_spec_name">should get yelled at when sending unexpected messages</span>
|
226
|
+
<div class="failure" id="failure_3">
|
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>
|
228
|
+
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:29:
|
229
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
|
230
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
231
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
232
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
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>
|
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>
|
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
|
+
<span class="linenum">30</span> <span class="keyword">end</span></code></pre>
|
237
|
+
</div>
|
238
|
+
</dd>
|
239
|
+
<script type="text/javascript">moveProgressBar('29.4');</script>
|
240
|
+
<dd class="spec pending_fixed">
|
241
|
+
<span class="failed_spec_name">has a bug we need to fix</span>
|
242
|
+
<div class="failure" id="failure_4">
|
243
|
+
<div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
|
244
|
+
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:33:
|
245
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
|
246
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
247
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
248
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
249
|
+
<pre class="ruby"><code><span class="linenum">31</span>
|
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>
|
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>
|
252
|
+
<span class="linenum">34</span> <span class="comment"># Actually, no. It's fixed. This will fail because it passes :-)</span>
|
253
|
+
<span class="linenum">35</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">("</span><span class="string">Bug</span><span class="punct">")</span></code></pre>
|
254
|
+
</div>
|
255
|
+
</dd>
|
256
|
+
</dl>
|
257
|
+
</div>
|
258
|
+
<div class="example_group">
|
259
|
+
<dl>
|
260
|
+
<dt id="example_group_2">Running specs with --diff</dt>
|
261
|
+
<script type="text/javascript">makeRed('example_group_2');</script>
|
262
|
+
<script type="text/javascript">moveProgressBar('35.2');</script>
|
263
|
+
<dd class="spec failed">
|
264
|
+
<span class="failed_spec_name">should print diff of different strings</span>
|
265
|
+
<div class="failure" id="failure_5">
|
266
|
+
<div class="message"><pre>expected: "RSpec is a\nbehaviour driven development\nframework for Ruby\n",
|
267
|
+
got: "RSpec is a\nbehavior driven development\nframework for Ruby\n" (using ==)
|
268
|
+
Diff:
|
269
|
+
@@ -1,4 +1,4 @@
|
270
|
+
RSpec is a
|
271
|
+
-behaviour driven development
|
272
|
+
+behavior driven development
|
273
|
+
framework for Ruby
|
274
|
+
</pre></div>
|
275
|
+
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:13:
|
276
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
|
277
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
278
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
279
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
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>
|
281
|
+
<span class="linenum">12</span><span class="constant">EOF</span>
|
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>
|
283
|
+
<span class="linenum">14</span> <span class="keyword">end</span></code></pre>
|
284
|
+
</div>
|
285
|
+
</dd>
|
286
|
+
<script type="text/javascript">moveProgressBar('41.1');</script>
|
287
|
+
<dd class="spec failed">
|
288
|
+
<span class="failed_spec_name">should print diff of different objects' pretty representation</span>
|
289
|
+
<div class="failure" id="failure_6">
|
290
|
+
<div class="message"><pre>expected <Animal
|
291
|
+
name=bob,
|
292
|
+
species=tortoise
|
293
|
+
>
|
294
|
+
, got <Animal
|
295
|
+
name=bob,
|
296
|
+
species=giraffe
|
297
|
+
>
|
298
|
+
(using .eql?)
|
299
|
+
Diff:
|
300
|
+
@@ -1,5 +1,5 @@
|
301
|
+
<Animal
|
302
|
+
name=bob,
|
303
|
+
-species=tortoise
|
304
|
+
+species=giraffe
|
305
|
+
>
|
306
|
+
</pre></div>
|
307
|
+
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:
|
308
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
|
309
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
310
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
311
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
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>
|
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>
|
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>
|
315
|
+
<span class="linenum">35</span> <span class="keyword">end</span>
|
316
|
+
<span class="linenum">36</span><span class="keyword">end</span></code></pre>
|
317
|
+
</div>
|
318
|
+
</dd>
|
319
|
+
</dl>
|
320
|
+
</div>
|
321
|
+
<div class="example_group">
|
322
|
+
<dl>
|
323
|
+
<dt id="example_group_3">A consumer of a stub</dt>
|
324
|
+
<script type="text/javascript">moveProgressBar('47.0');</script>
|
325
|
+
<dd class="spec passed"><span class="passed_spec_name">should be able to stub methods on any Object</span></dd>
|
326
|
+
</dl>
|
327
|
+
</div>
|
328
|
+
<div class="example_group">
|
329
|
+
<dl>
|
330
|
+
<dt id="example_group_4">A stubbed method on a class</dt>
|
331
|
+
<script type="text/javascript">moveProgressBar('52.9');</script>
|
332
|
+
<dd class="spec passed"><span class="passed_spec_name">should return the stubbed value</span></dd>
|
333
|
+
<script type="text/javascript">moveProgressBar('58.8');</script>
|
334
|
+
<dd class="spec passed"><span class="passed_spec_name">should revert to the original method after each spec</span></dd>
|
335
|
+
<script type="text/javascript">moveProgressBar('64.7');</script>
|
336
|
+
<dd class="spec passed"><span class="passed_spec_name">can stub! and mock the same message</span></dd>
|
337
|
+
</dl>
|
338
|
+
</div>
|
339
|
+
<div class="example_group">
|
340
|
+
<dl>
|
341
|
+
<dt id="example_group_5">A mock</dt>
|
342
|
+
<script type="text/javascript">moveProgressBar('70.5');</script>
|
343
|
+
<dd class="spec passed"><span class="passed_spec_name">can stub!</span></dd>
|
344
|
+
<script type="text/javascript">moveProgressBar('76.4');</script>
|
345
|
+
<dd class="spec passed"><span class="passed_spec_name">can stub! and mock</span></dd>
|
346
|
+
<script type="text/javascript">moveProgressBar('82.3');</script>
|
347
|
+
<dd class="spec passed"><span class="passed_spec_name">can stub! and mock the same message</span></dd>
|
348
|
+
</dl>
|
349
|
+
</div>
|
350
|
+
<div class="example_group">
|
351
|
+
<dl>
|
352
|
+
<dt id="example_group_6">pending example (using pending method)</dt>
|
353
|
+
<script type="text/javascript">makeYellow('example_group_6');</script>
|
354
|
+
<script type="text/javascript">moveProgressBar('88.2');</script>
|
355
|
+
<dd class="spec not_implemented"><span class="not_implemented_spec_name">should be reported as "PENDING: for some reason" (PENDING: for some reason)</span></dd>
|
356
|
+
</dl>
|
357
|
+
</div>
|
358
|
+
<div class="example_group">
|
359
|
+
<dl>
|
360
|
+
<dt id="example_group_7">pending example (with no block)</dt>
|
361
|
+
<script type="text/javascript">makeYellow('example_group_7');</script>
|
362
|
+
<script type="text/javascript">moveProgressBar('94.1');</script>
|
363
|
+
<dd class="spec not_implemented"><span class="not_implemented_spec_name">should be reported as "PENDING: Not Yet Implemented" (PENDING: Not Yet Implemented)</span></dd>
|
364
|
+
</dl>
|
365
|
+
</div>
|
366
|
+
<div class="example_group">
|
367
|
+
<dl>
|
368
|
+
<dt id="example_group_8">pending example (with block for pending)</dt>
|
369
|
+
<script type="text/javascript">makeYellow('example_group_8');</script>
|
370
|
+
<script type="text/javascript">moveProgressBar('100.0');</script>
|
371
|
+
<dd class="spec not_implemented"><span class="not_implemented_spec_name">should have a failing block, passed to pending, reported as "PENDING: for some reason" (PENDING: for some reason)</span></dd>
|
372
|
+
</dl>
|
373
|
+
</div>
|
374
|
+
<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
|
375
|
+
<script type="text/javascript">document.getElementById('totals').innerHTML = "17 examples, 6 failures, 3 pending";</script>
|
376
|
+
</div>
|
377
|
+
</div>
|
378
|
+
</body>
|
379
|
+
</html>
|