rspec 1.1.12 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +2 -1
- data/.document +7 -0
- data/History.txt +58 -0
- data/License.txt +1 -1
- data/Manifest.txt +45 -82
- data/README.txt +3 -6
- data/Rakefile +33 -13
- data/Ruby1.9.markdown +32 -0
- data/TODO.txt +10 -4
- data/Upgrade.markdown +63 -0
- data/bin/spec +1 -1
- data/cucumber.yml +3 -0
- data/examples/failing/{failing_autogenerated_docstrings_example.rb → failing_implicit_docstrings_example.rb} +0 -0
- data/examples/failing/pending_example.rb +9 -0
- data/examples/failing/spec_helper.rb +1 -1
- data/examples/passing/{custom_expectation_matchers.rb → custom_matchers.rb} +0 -0
- data/examples/passing/filtered_formatter.rb +18 -0
- data/examples/passing/filtered_formatter_example.rb +31 -0
- data/examples/passing/implicit_docstrings_example.rb +18 -0
- data/examples/passing/spec_helper.rb +1 -1
- data/examples/ruby1.9.compatibility/access_to_constants_spec.rb +17 -18
- data/features/before_and_after_blocks/before_and_after_blocks.feature +4 -4
- data/features/example_groups/example_group_with_should_methods.feature +1 -1
- data/features/example_groups/{autogenerated_docstrings.feature → implicit_docstrings.feature} +7 -9
- data/features/example_groups/nested_groups.feature +1 -1
- data/features/heckle/heckle.feature +56 -0
- data/features/interop/examples_and_tests_together.feature +1 -1
- data/features/interop/test_but_not_test_unit.feature +1 -1
- data/features/interop/test_case_with_should_methods.feature +1 -1
- data/features/matchers/create_matcher.feature +115 -0
- data/features/mock_framework_integration/use_flexmock.feature +22 -4
- data/features/mock_framework_integration/use_mocha.feature +27 -0
- data/features/mock_framework_integration/use_rr.feature +27 -0
- data/features/mocks/mix_stubs_and_mocks.feature +22 -0
- data/features/pending/pending_examples.feature +81 -0
- data/features/step_definitions/running_rspec.rb +5 -3
- data/features/support/env.rb +1 -1
- data/features/support/matchers/smart_match.rb +2 -2
- data/lib/autotest/rspec.rb +1 -1
- data/lib/spec.rb +1 -1
- data/lib/{adapters → spec/adapters}/mock_frameworks/flexmock.rb +0 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/mocha.rb +0 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/rr.rb +0 -0
- data/lib/{adapters → spec/adapters}/mock_frameworks/rspec.rb +0 -1
- data/lib/spec/autorun.rb +3 -0
- data/lib/spec/dsl.rb +3 -1
- data/lib/spec/dsl/matchers.rb +13 -0
- data/lib/spec/example.rb +4 -0
- data/lib/spec/example/before_and_after_hooks.rb +5 -20
- data/lib/spec/example/errors.rb +3 -3
- data/lib/spec/example/example_description.rb +15 -0
- data/lib/spec/example/example_group.rb +0 -15
- data/lib/spec/example/example_group_factory.rb +34 -46
- data/lib/spec/example/example_group_hierarchy.rb +53 -0
- data/lib/spec/example/example_group_methods.rb +101 -211
- data/lib/spec/example/example_methods.rb +61 -81
- data/lib/spec/example/module_reopening_fix.rb +23 -1
- data/lib/spec/example/pending.rb +3 -2
- data/lib/spec/example/predicate_matchers.rb +47 -0
- data/lib/spec/example/subject.rb +91 -0
- data/lib/spec/expectations.rb +1 -1
- data/lib/spec/expectations/differs/default.rb +0 -1
- data/lib/spec/expectations/extensions.rb +0 -1
- data/lib/spec/expectations/handler.rb +13 -6
- data/lib/spec/interop/test.rb +5 -0
- data/lib/spec/interop/test/unit/testcase.rb +5 -22
- data/lib/spec/matchers.rb +22 -8
- data/lib/spec/matchers/be.rb +4 -9
- data/lib/spec/matchers/be_close.rb +20 -5
- data/lib/spec/matchers/be_instance_of.rb +45 -0
- data/lib/spec/matchers/be_kind_of.rb +45 -0
- data/lib/spec/matchers/change.rb +8 -6
- data/lib/spec/matchers/compatibility.rb +14 -0
- data/lib/spec/matchers/eql.rb +24 -6
- data/lib/spec/matchers/equal.rb +24 -6
- data/lib/spec/matchers/exist.rb +21 -5
- data/lib/spec/matchers/extensions/instance_exec.rb +25 -0
- data/lib/spec/matchers/generated_descriptions.rb +2 -2
- data/lib/spec/matchers/has.rb +28 -11
- data/lib/spec/matchers/have.rb +2 -2
- data/lib/spec/matchers/include.rb +2 -2
- data/lib/spec/matchers/match.rb +25 -7
- data/lib/spec/matchers/match_array.rb +3 -3
- data/lib/spec/matchers/matcher.rb +51 -0
- data/lib/spec/matchers/method_missing.rb +2 -2
- data/lib/spec/matchers/operator_matcher.rb +12 -5
- data/lib/spec/matchers/raise_error.rb +3 -3
- data/lib/spec/matchers/respond_to.rb +3 -3
- data/lib/spec/matchers/satisfy.rb +7 -7
- data/lib/spec/matchers/throw_symbol.rb +3 -5
- data/lib/spec/mocks.rb +3 -3
- data/lib/spec/mocks/argument_expectation.rb +15 -15
- data/lib/spec/mocks/{argument_constraints.rb → argument_matchers.rb} +19 -23
- data/lib/spec/mocks/error_generator.rb +5 -8
- data/lib/spec/mocks/framework.rb +1 -1
- data/lib/spec/mocks/message_expectation.rb +5 -13
- data/lib/spec/mocks/mock.rb +4 -5
- data/lib/spec/mocks/proxy.rb +9 -5
- data/lib/spec/mocks/spec_methods.rb +10 -1
- data/lib/spec/rake/spectask.rb +0 -1
- data/lib/spec/runner.rb +6 -28
- data/lib/spec/runner/configuration.rb +3 -3
- data/lib/spec/runner/drb_command_line.rb +2 -1
- data/lib/spec/runner/example_group_runner.rb +3 -2
- data/lib/spec/runner/formatter/base_text_formatter.rb +34 -19
- data/lib/spec/runner/formatter/failing_example_groups_formatter.rb +3 -5
- data/lib/spec/runner/formatter/html_formatter.rb +2 -3
- data/lib/spec/runner/formatter/nested_text_formatter.rb +7 -25
- data/lib/spec/runner/formatter/progress_bar_formatter.rb +1 -1
- data/lib/spec/runner/formatter/snippet_extractor.rb +1 -1
- data/lib/spec/runner/formatter/specdoc_formatter.rb +1 -7
- data/lib/spec/runner/heckle_runner.rb +3 -6
- data/lib/spec/runner/heckle_runner_unsupported.rb +1 -1
- data/lib/spec/runner/option_parser.rb +19 -21
- data/lib/spec/runner/options.rb +32 -27
- data/lib/spec/runner/reporter.rb +8 -9
- data/lib/spec/test/unit.rb +10 -0
- data/lib/spec/version.rb +2 -2
- data/{features/support → resources}/helpers/cmdline.rb +2 -2
- data/resources/rake/verify_rcov.rake +1 -1
- data/resources/spec/example_group_with_should_methods.rb +1 -1
- data/resources/spec/simple_spec.rb +1 -1
- data/resources/test/spec_and_test_together.rb +2 -3
- data/resources/test/spec_including_test_but_not_unit.rb +1 -1
- data/resources/test/test_case_with_should_methods.rb +2 -3
- data/spec/autotest/autotest_helper.rb +0 -1
- data/spec/autotest/rspec_spec.rb +95 -98
- data/spec/spec/dsl/main_spec.rb +3 -3
- data/spec/spec/dsl/matchers_spec.rb +25 -0
- data/spec/spec/example/example_group_class_definition_spec.rb +14 -15
- data/spec/spec/example/example_group_factory_spec.rb +31 -44
- data/spec/spec/example/example_group_methods_spec.rb +86 -52
- data/spec/spec/example/example_group_spec.rb +32 -79
- data/spec/spec/example/example_matcher_spec.rb +10 -10
- data/spec/spec/example/example_methods_spec.rb +108 -242
- data/spec/spec/example/nested_example_group_spec.rb +2 -2
- data/spec/spec/example/pending_module_spec.rb +66 -41
- data/spec/spec/example/shared_example_group_spec.rb +4 -4
- data/spec/spec/{matchers → expectations}/handler_spec.rb +52 -4
- data/spec/spec/interop/test/unit/resources/spec_that_fails.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_that_passes.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_with_errors.rb +2 -2
- data/spec/spec/interop/test/unit/resources/spec_with_options_hash.rb +2 -2
- data/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +2 -2
- data/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +2 -2
- data/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +2 -2
- data/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +2 -2
- data/spec/spec/interop/test/unit/testcase_spec.rb +0 -4
- data/spec/spec/matchers/be_close_spec.rb +1 -1
- data/spec/spec/matchers/be_instance_of_spec.rb +29 -0
- data/spec/spec/matchers/be_kind_of_spec.rb +29 -0
- data/spec/spec/matchers/change_spec.rb +20 -0
- data/spec/spec/matchers/compatibility_spec.rb +34 -0
- data/spec/spec/matchers/description_generation_spec.rb +0 -12
- data/spec/spec/matchers/eql_spec.rb +2 -2
- data/spec/spec/matchers/equal_spec.rb +2 -2
- data/spec/spec/matchers/exist_spec.rb +8 -4
- data/spec/spec/matchers/have_spec.rb +4 -4
- data/spec/spec/matchers/match_spec.rb +2 -2
- data/spec/spec/matchers/matcher_methods_spec.rb +1 -1
- data/spec/spec/matchers/matcher_spec.rb +97 -0
- data/spec/spec/matchers/throw_symbol_spec.rb +8 -8
- data/spec/spec/mocks/{bug_report_496.rb → bug_report_496_spec.rb} +0 -0
- data/spec/spec/mocks/{failing_mock_argument_constraints_spec.rb → failing_argument_matchers_spec.rb} +2 -2
- data/spec/spec/mocks/hash_including_matcher_spec.rb +4 -4
- data/spec/spec/mocks/hash_not_including_matcher_spec.rb +3 -3
- data/spec/spec/mocks/mock_spec.rb +27 -2
- data/spec/spec/mocks/nil_expectation_warning_spec.rb +1 -1
- data/spec/spec/mocks/partial_mock_spec.rb +18 -3
- data/spec/spec/mocks/{passing_mock_argument_constraints_spec.rb → passing_argument_matchers_spec.rb} +6 -6
- data/spec/spec/mocks/stubbed_message_expectations_spec.rb +13 -1
- data/spec/spec/package/bin_spec_spec.rb +2 -2
- data/spec/spec/runner/configuration_spec.rb +12 -12
- data/spec/spec/runner/drb_command_line_spec.rb +71 -73
- data/spec/spec/runner/formatter/base_text_formatter_spec.rb +82 -1
- data/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +8 -8
- data/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +4 -4
- data/spec/spec/runner/formatter/html_formatted-1.8.6.html +8 -8
- data/spec/spec/runner/formatter/html_formatted-1.8.7.html +38 -26
- data/spec/spec/runner/formatter/html_formatted-1.9.1.html +61 -53
- data/spec/spec/runner/formatter/html_formatter_spec.rb +100 -48
- data/spec/spec/runner/formatter/nested_text_formatter_spec.rb +20 -34
- data/spec/spec/runner/formatter/profile_formatter_spec.rb +2 -1
- data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +9 -6
- data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +6 -6
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +20 -20
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.7.html +38 -26
- data/spec/spec/runner/formatter/text_mate_formatted-1.9.1.html +55 -47
- data/spec/spec/runner/formatter/{spec_mate_formatter_spec.rb → text_mate_formatter_spec.rb} +11 -9
- data/spec/spec/runner/heckle_runner_spec.rb +1 -1
- data/spec/spec/runner/heckler_spec.rb +1 -1
- data/spec/spec/runner/option_parser_spec.rb +28 -11
- data/spec/spec/runner/options_spec.rb +34 -0
- data/spec/spec/runner/reporter_spec.rb +66 -62
- data/spec/spec/runner/resources/utf8_encoded.rb +1 -0
- data/spec/spec/runner/spec_drb.opts +1 -0
- data/spec/spec/runner_spec.rb +7 -5
- data/spec/spec_helper.rb +24 -2
- metadata +49 -90
- data/examples/passing/autogenerated_docstrings_example.rb +0 -25
- data/examples/passing/before_and_after_example.rb +0 -40
- data/examples/passing/behave_as_example.rb +0 -45
- data/examples/passing/legacy_spec.rb +0 -11
- data/examples/passing/priority.txt +0 -1
- data/features/support/helpers/story_helper.rb +0 -16
- data/lib/spec/expectations/extensions/string_and_symbol.rb +0 -17
- data/lib/spec/runner/formatter/story/html_formatter.rb +0 -174
- data/lib/spec/runner/formatter/story/plain_text_formatter.rb +0 -194
- data/lib/spec/runner/formatter/story/progress_bar_formatter.rb +0 -42
- data/lib/spec/story.rb +0 -10
- data/lib/spec/story/extensions.rb +0 -3
- data/lib/spec/story/extensions/main.rb +0 -86
- data/lib/spec/story/extensions/regexp.rb +0 -9
- data/lib/spec/story/extensions/string.rb +0 -9
- data/lib/spec/story/given_scenario.rb +0 -14
- data/lib/spec/story/runner.rb +0 -57
- data/lib/spec/story/runner/plain_text_story_runner.rb +0 -48
- data/lib/spec/story/runner/scenario_collector.rb +0 -18
- data/lib/spec/story/runner/scenario_runner.rb +0 -54
- data/lib/spec/story/runner/story_mediator.rb +0 -137
- data/lib/spec/story/runner/story_parser.rb +0 -247
- data/lib/spec/story/runner/story_runner.rb +0 -74
- data/lib/spec/story/scenario.rb +0 -14
- data/lib/spec/story/step.rb +0 -70
- data/lib/spec/story/step_group.rb +0 -89
- data/lib/spec/story/step_mother.rb +0 -38
- data/lib/spec/story/story.rb +0 -39
- data/lib/spec/story/world.rb +0 -124
- data/resources/spec/spec_with_flexmock.rb +0 -19
- data/rspec.gemspec +0 -32
- data/spec/spec/matchers/mock_constraint_matchers_spec.rb +0 -24
- data/spec/spec/runner/formatter/story/html_formatter_spec.rb +0 -135
- data/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +0 -600
- data/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb +0 -82
- data/spec/spec/spec_spec.rb +0 -21
- data/spec/spec/story/builders.rb +0 -46
- data/spec/spec/story/extensions/main_spec.rb +0 -161
- data/spec/spec/story/extensions_spec.rb +0 -14
- data/spec/spec/story/given_scenario_spec.rb +0 -27
- data/spec/spec/story/runner/plain_text_story_runner_spec.rb +0 -90
- data/spec/spec/story/runner/scenario_collector_spec.rb +0 -27
- data/spec/spec/story/runner/scenario_runner_spec.rb +0 -214
- data/spec/spec/story/runner/story_mediator_spec.rb +0 -143
- data/spec/spec/story/runner/story_parser_spec.rb +0 -401
- data/spec/spec/story/runner/story_runner_spec.rb +0 -294
- data/spec/spec/story/runner_spec.rb +0 -93
- data/spec/spec/story/scenario_spec.rb +0 -18
- data/spec/spec/story/step_group_spec.rb +0 -157
- data/spec/spec/story/step_mother_spec.rb +0 -84
- data/spec/spec/story/step_spec.rb +0 -272
- data/spec/spec/story/story_helper.rb +0 -2
- data/spec/spec/story/story_spec.rb +0 -84
- data/spec/spec/story/world_spec.rb +0 -423
- data/story_server/prototype/javascripts/builder.js +0 -136
- data/story_server/prototype/javascripts/controls.js +0 -972
- data/story_server/prototype/javascripts/dragdrop.js +0 -976
- data/story_server/prototype/javascripts/effects.js +0 -1117
- data/story_server/prototype/javascripts/prototype.js +0 -4140
- data/story_server/prototype/javascripts/rspec.js +0 -149
- data/story_server/prototype/javascripts/scriptaculous.js +0 -58
- data/story_server/prototype/javascripts/slider.js +0 -276
- data/story_server/prototype/javascripts/sound.js +0 -55
- data/story_server/prototype/javascripts/unittest.js +0 -568
- data/story_server/prototype/lib/server.rb +0 -24
- data/story_server/prototype/stories.html +0 -176
- data/story_server/prototype/stylesheets/rspec.css +0 -136
- data/story_server/prototype/stylesheets/test.css +0 -90
@@ -12,21 +12,19 @@ module Spec
|
|
12
12
|
options.stub!(:dry_run).and_return(false)
|
13
13
|
options.stub!(:colour).and_return(false)
|
14
14
|
@formatter = NestedTextFormatter.new(options, io)
|
15
|
-
@example_group = ::Spec::Example::
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
15
|
+
@example_group = Class.new(::Spec::Example::ExampleGroupDouble).describe("ExampleGroup")
|
16
|
+
@example_group.example("example") {}
|
19
17
|
end
|
20
18
|
|
21
|
-
describe "where ExampleGroup has no
|
22
|
-
before do
|
23
|
-
add_example_group
|
24
|
-
end
|
25
|
-
|
19
|
+
describe "where ExampleGroup has no superclass with a description" do
|
26
20
|
def add_example_group
|
27
21
|
formatter.add_example_group(example_group)
|
28
22
|
end
|
29
23
|
|
24
|
+
before do
|
25
|
+
add_example_group
|
26
|
+
end
|
27
|
+
|
30
28
|
describe "#dump_summary" do
|
31
29
|
it "should produce standard summary without pending when pending has a 0 count" do
|
32
30
|
formatter.dump_summary(3, 2, 1, 0)
|
@@ -52,25 +50,17 @@ OUT
|
|
52
50
|
end
|
53
51
|
|
54
52
|
describe "#add_example_group" do
|
55
|
-
describe "when ExampleGroup has
|
56
|
-
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
describe "when ExampleGroup has no parents with description args" do
|
61
|
-
before do
|
62
|
-
example_group.superclass.description_args.should be_empty
|
63
|
-
end
|
64
|
-
|
53
|
+
describe "when ExampleGroup has a nested description" do
|
54
|
+
|
55
|
+
describe "when ExampleGroup has no parents with nested description" do
|
65
56
|
it "should push ExampleGroup name" do
|
66
57
|
io.string.should eql("ExampleGroup\n")
|
67
58
|
end
|
68
59
|
end
|
69
60
|
|
70
|
-
describe "when ExampleGroup has one parent with description
|
61
|
+
describe "when ExampleGroup has one parent with nested description" do
|
71
62
|
attr_reader :child_example_group
|
72
63
|
def add_example_group
|
73
|
-
example_group.description_args.should_not be_nil
|
74
64
|
@child_example_group = Class.new(example_group).describe("Child ExampleGroup")
|
75
65
|
end
|
76
66
|
|
@@ -102,10 +92,9 @@ OUT
|
|
102
92
|
end
|
103
93
|
end
|
104
94
|
|
105
|
-
describe "when ExampleGroup has two parents with description
|
95
|
+
describe "when ExampleGroup has two parents with nested description" do
|
106
96
|
attr_reader :child_example_group, :grand_child_example_group
|
107
97
|
def add_example_group
|
108
|
-
example_group.description_args.should_not be_nil
|
109
98
|
@child_example_group = Class.new(example_group).describe("Child ExampleGroup")
|
110
99
|
@grand_child_example_group = Class.new(child_example_group).describe("GrandChild ExampleGroup")
|
111
100
|
end
|
@@ -140,13 +129,12 @@ OUT
|
|
140
129
|
end
|
141
130
|
end
|
142
131
|
|
143
|
-
describe "when ExampleGroup
|
132
|
+
describe "when ExampleGroup nested description is blank" do
|
144
133
|
attr_reader :child_example_group
|
145
134
|
|
146
135
|
describe "and parent ExampleGroups have not been printed" do
|
147
136
|
def add_example_group
|
148
137
|
@child_example_group = Class.new(example_group)
|
149
|
-
child_example_group.description_args.should be_empty
|
150
138
|
formatter.add_example_group(child_example_group)
|
151
139
|
end
|
152
140
|
|
@@ -160,7 +148,6 @@ OUT
|
|
160
148
|
describe "and parent ExampleGroups have been printed" do
|
161
149
|
def add_example_group
|
162
150
|
@child_example_group = Class.new(example_group)
|
163
|
-
child_example_group.description_args.should be_empty
|
164
151
|
formatter.add_example_group(example_group)
|
165
152
|
io.string = ""
|
166
153
|
formatter.add_example_group(child_example_group)
|
@@ -172,10 +159,9 @@ OUT
|
|
172
159
|
end
|
173
160
|
end
|
174
161
|
|
175
|
-
describe "when ExampleGroup
|
162
|
+
describe "when ExampleGroup nested description is blank" do
|
176
163
|
def add_example_group
|
177
164
|
example_group.set_description
|
178
|
-
example_group.description_args.should be_empty
|
179
165
|
super
|
180
166
|
end
|
181
167
|
|
@@ -192,11 +178,11 @@ OUT
|
|
192
178
|
formatter.example_failed(
|
193
179
|
example_group.it("spec"),
|
194
180
|
98,
|
195
|
-
::Spec::Runner::Reporter::Failure.new("c s", RuntimeError.new)
|
181
|
+
::Spec::Runner::Reporter::Failure.new("g", "c s", RuntimeError.new)
|
196
182
|
)
|
197
183
|
io.string.should == <<-OUT
|
198
184
|
ExampleGroup
|
199
|
-
spec (
|
185
|
+
spec (FAILED - 98)
|
200
186
|
OUT
|
201
187
|
end
|
202
188
|
end
|
@@ -206,7 +192,7 @@ OUT
|
|
206
192
|
formatter.example_failed(
|
207
193
|
example_group.it("spec"),
|
208
194
|
98,
|
209
|
-
::Spec::Runner::Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
|
195
|
+
::Spec::Runner::Reporter::Failure.new("g", "c s", Spec::Expectations::ExpectationNotMetError.new)
|
210
196
|
)
|
211
197
|
io.string.should == <<-OUT
|
212
198
|
ExampleGroup
|
@@ -230,13 +216,13 @@ OUT
|
|
230
216
|
formatter.example_failed(
|
231
217
|
grand_child_example_group.it("spec"),
|
232
218
|
98,
|
233
|
-
::Spec::Runner::Reporter::Failure.new("c s", RuntimeError.new)
|
219
|
+
::Spec::Runner::Reporter::Failure.new("g", "c s", RuntimeError.new)
|
234
220
|
)
|
235
221
|
io.string.should == <<-OUT
|
236
222
|
ExampleGroup
|
237
223
|
Child ExampleGroup
|
238
224
|
GrandChild ExampleGroup
|
239
|
-
spec (
|
225
|
+
spec (FAILED - 98)
|
240
226
|
OUT
|
241
227
|
end
|
242
228
|
end
|
@@ -246,7 +232,7 @@ OUT
|
|
246
232
|
formatter.example_failed(
|
247
233
|
grand_child_example_group.it("spec"),
|
248
234
|
98,
|
249
|
-
::Spec::Runner::Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
|
235
|
+
::Spec::Runner::Reporter::Failure.new("g", "c s", Spec::Expectations::ExpectationNotMetError.new)
|
250
236
|
)
|
251
237
|
io.string.should == <<-OUT
|
252
238
|
ExampleGroup
|
@@ -10,6 +10,7 @@ module Spec
|
|
10
10
|
@io = StringIO.new
|
11
11
|
options = mock('options')
|
12
12
|
options.stub!(:colour).and_return(true)
|
13
|
+
options.stub!(:autospec).and_return(true)
|
13
14
|
@formatter = ProfileFormatter.new(options, io)
|
14
15
|
end
|
15
16
|
|
@@ -28,7 +29,7 @@ module Spec
|
|
28
29
|
it "should correctly record a passed example" do
|
29
30
|
now = Time.now
|
30
31
|
Time.stub!(:now).and_return(now)
|
31
|
-
parent_example_group = Class.new(
|
32
|
+
parent_example_group = Class.new(::Spec::Example::ExampleGroupDouble).describe('Parent')
|
32
33
|
child_example_group = Class.new(parent_example_group).describe('Child')
|
33
34
|
|
34
35
|
formatter.add_example_group(child_example_group)
|
@@ -10,6 +10,7 @@ module Spec
|
|
10
10
|
@options = mock('options')
|
11
11
|
@options.stub!(:dry_run).and_return(false)
|
12
12
|
@options.stub!(:colour).and_return(false)
|
13
|
+
@options.stub!(:autospec).and_return(false)
|
13
14
|
@formatter = ProgressBarFormatter.new(@options, @io)
|
14
15
|
end
|
15
16
|
|
@@ -29,6 +30,7 @@ module Spec
|
|
29
30
|
end
|
30
31
|
end
|
31
32
|
example = example_group.examples.first
|
33
|
+
@formatter.add_example_group(example_group)
|
32
34
|
@formatter.example_pending(example, "message", "#{__FILE__}:#{__LINE__}")
|
33
35
|
@io.rewind
|
34
36
|
@formatter.dump_summary(3, 2, 1, 1)
|
@@ -49,21 +51,21 @@ Finished in 3 seconds
|
|
49
51
|
it "should push red F for failure spec" do
|
50
52
|
@io.should_receive(:tty?).and_return(true)
|
51
53
|
@options.should_receive(:colour).and_return(true)
|
52
|
-
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new))
|
54
|
+
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new("g", "c s", Spec::Expectations::ExpectationNotMetError.new))
|
53
55
|
@io.string.should eql("\e[31mF\e[0m")
|
54
56
|
end
|
55
57
|
|
56
|
-
it "should push
|
58
|
+
it "should push red F for error spec" do
|
57
59
|
@io.should_receive(:tty?).and_return(true)
|
58
60
|
@options.should_receive(:colour).and_return(true)
|
59
|
-
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new("c s", RuntimeError.new))
|
60
|
-
@io.string.should eql("\e[
|
61
|
+
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new("g", "c s", RuntimeError.new))
|
62
|
+
@io.string.should eql("\e[31mF\e[0m")
|
61
63
|
end
|
62
64
|
|
63
65
|
it "should push blue F for fixed pending spec" do
|
64
66
|
@io.should_receive(:tty?).and_return(true)
|
65
67
|
@options.should_receive(:colour).and_return(true)
|
66
|
-
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new("c s", Spec::Example::PendingExampleFixedError.new))
|
68
|
+
@formatter.example_failed("spec", 98, Spec::Runner::Reporter::Failure.new("g", "c s", Spec::Example::PendingExampleFixedError.new))
|
67
69
|
@io.string.should eql("\e[34mF\e[0m")
|
68
70
|
end
|
69
71
|
|
@@ -95,7 +97,8 @@ EOE
|
|
95
97
|
end
|
96
98
|
example = example_group.examples.first
|
97
99
|
file = __FILE__
|
98
|
-
line = __LINE__ +
|
100
|
+
line = __LINE__ + 2
|
101
|
+
@formatter.add_example_group(example_group)
|
99
102
|
@formatter.example_pending(example, "message", "#{__FILE__}:#{__LINE__}")
|
100
103
|
@formatter.dump_pending
|
101
104
|
@io.string.should ==(<<-HERE)
|
@@ -52,9 +52,9 @@ module Spec
|
|
52
52
|
formatter.example_failed(
|
53
53
|
example_group.it("spec"),
|
54
54
|
98,
|
55
|
-
Spec::Runner::Reporter::Failure.new("c s", RuntimeError.new)
|
55
|
+
Spec::Runner::Reporter::Failure.new("g", "c s", RuntimeError.new)
|
56
56
|
)
|
57
|
-
io.string.should have_example_group_output("- spec (
|
57
|
+
io.string.should have_example_group_output("- spec (FAILED - 98)\n")
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
@@ -63,7 +63,7 @@ module Spec
|
|
63
63
|
formatter.example_failed(
|
64
64
|
example_group.it("spec"),
|
65
65
|
98,
|
66
|
-
Spec::Runner::Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
|
66
|
+
Spec::Runner::Reporter::Failure.new("g", "c s", Spec::Expectations::ExpectationNotMetError.new)
|
67
67
|
)
|
68
68
|
io.string.should have_example_group_output("- spec (FAILED - 98)\n")
|
69
69
|
end
|
@@ -84,9 +84,9 @@ module Spec
|
|
84
84
|
formatter.example_failed(
|
85
85
|
example_group.it("spec"),
|
86
86
|
98,
|
87
|
-
Spec::Runner::Reporter::Failure.new("c s", RuntimeError.new)
|
87
|
+
Spec::Runner::Reporter::Failure.new("g", "c s", RuntimeError.new)
|
88
88
|
)
|
89
|
-
io.string.should have_nested_example_group_output("- spec (
|
89
|
+
io.string.should have_nested_example_group_output("- spec (FAILED - 98)\n")
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
@@ -95,7 +95,7 @@ module Spec
|
|
95
95
|
formatter.example_failed(
|
96
96
|
example_group.it("spec"),
|
97
97
|
98,
|
98
|
-
Spec::Runner::Reporter::Failure.new("c s", Spec::Expectations::ExpectationNotMetError.new)
|
98
|
+
Spec::Runner::Reporter::Failure.new("g", "c s", Spec::Expectations::ExpectationNotMetError.new)
|
99
99
|
)
|
100
100
|
io.string.should have_nested_example_group_output("- spec (FAILED - 98)\n")
|
101
101
|
end
|
@@ -43,7 +43,7 @@ function makeYellow(element_id) {
|
|
43
43
|
</script>
|
44
44
|
<style type="text/css">
|
45
45
|
#rspec-header {
|
46
|
-
background: #65C400; color: #fff; height:
|
46
|
+
background: #65C400; color: #fff; height: 4em;
|
47
47
|
}
|
48
48
|
|
49
49
|
.rspec-report h1 {
|
@@ -51,7 +51,7 @@ function makeYellow(element_id) {
|
|
51
51
|
padding: 10px;
|
52
52
|
font-family: "Lucida Grande", Helvetica, sans-serif;
|
53
53
|
font-size: 1.8em;
|
54
|
-
|
54
|
+
position: absolute;
|
55
55
|
}
|
56
56
|
|
57
57
|
#summary {
|
@@ -192,9 +192,9 @@ 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><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=13">./examples/failing/mocking_example.rb:13</a>
|
195
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
196
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
197
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
195
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
196
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
197
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> </pre></div>
|
198
198
|
<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>
|
199
199
|
<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>
|
200
200
|
<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>
|
@@ -208,9 +208,9 @@ a {
|
|
208
208
|
<div class="failure" id="failure_2">
|
209
209
|
<div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
|
210
210
|
<div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=22">./examples/failing/mocking_example.rb:22</a>
|
211
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
212
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
213
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
211
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
212
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
213
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> </pre></div>
|
214
214
|
<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>
|
215
215
|
<span class="linenum">21</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">one</span>
|
216
216
|
<span class="offending"><span class="linenum">22</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">three</span></span>
|
@@ -224,9 +224,9 @@ a {
|
|
224
224
|
<div class="failure" id="failure_3">
|
225
225
|
<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>
|
226
226
|
<div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=29">./examples/failing/mocking_example.rb:29</a>
|
227
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
228
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
229
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
227
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
228
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
229
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> </pre></div>
|
230
230
|
<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>
|
231
231
|
<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>
|
232
232
|
<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>
|
@@ -239,9 +239,9 @@ a {
|
|
239
239
|
<div class="failure" id="failure_4">
|
240
240
|
<div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
|
241
241
|
<div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=33">./examples/failing/mocking_example.rb:33</a>
|
242
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
243
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
244
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
242
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
243
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
244
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> </pre></div>
|
245
245
|
<pre class="ruby"><code><span class="linenum">31</span>
|
246
246
|
<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>
|
247
247
|
<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>
|
@@ -269,9 +269,9 @@ Diff:
|
|
269
269
|
framework for Ruby
|
270
270
|
</pre></div>
|
271
271
|
<div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb&line=13">./examples/failing/diffing_spec.rb:13</a>
|
272
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
273
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
274
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
272
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
273
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
274
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> </pre></div>
|
275
275
|
<pre class="ruby"><code><span class="linenum">11</span><span class="ident">framework</span> <span class="keyword">for</span> <span class="constant">Ruby</span>
|
276
276
|
<span class="linenum">12</span><span class="constant">EOF</span>
|
277
277
|
<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>
|
@@ -300,9 +300,9 @@ Diff:
|
|
300
300
|
>
|
301
301
|
</pre></div>
|
302
302
|
<div class="backtrace"><pre><a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb&line=34">./examples/failing/diffing_spec.rb:34</a>
|
303
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
304
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
305
|
-
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/
|
303
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
304
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
305
|
+
<a href="txmt://open?url=file:///Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> </pre></div>
|
306
306
|
<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>
|
307
307
|
<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>
|
308
308
|
<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>
|
@@ -43,7 +43,7 @@ function makeYellow(element_id) {
|
|
43
43
|
</script>
|
44
44
|
<style type="text/css">
|
45
45
|
#rspec-header {
|
46
|
-
background: #65C400; color: #fff; height:
|
46
|
+
background: #65C400; color: #fff; height: 4em;
|
47
47
|
}
|
48
48
|
|
49
49
|
.rspec-report h1 {
|
@@ -51,7 +51,7 @@ function makeYellow(element_id) {
|
|
51
51
|
padding: 10px;
|
52
52
|
font-family: "Lucida Grande", Helvetica, sans-serif;
|
53
53
|
font-size: 1.8em;
|
54
|
-
|
54
|
+
position: absolute;
|
55
55
|
}
|
56
56
|
|
57
57
|
#summary {
|
@@ -191,10 +191,12 @@ a {
|
|
191
191
|
<span class="failed_spec_name">should fail when expected message not received</span>
|
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
|
-
<div class="backtrace"><pre><a href="txmt://open?url=file:///
|
195
|
-
<a href="txmt://open?url=file:///
|
196
|
-
<a href="txmt://open?url=file:///
|
197
|
-
<a href="txmt://open?url=file:///
|
194
|
+
<div class="backtrace"><pre><a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=13">./examples/failing/mocking_example.rb:13</a>
|
195
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
196
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
197
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a>
|
198
|
+
-e:1:in `load'
|
199
|
+
-e:1</pre></div>
|
198
200
|
<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>
|
199
201
|
<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>
|
200
202
|
<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>
|
@@ -207,10 +209,12 @@ a {
|
|
207
209
|
<span class="failed_spec_name">should fail when messages are received out of order</span>
|
208
210
|
<div class="failure" id="failure_2">
|
209
211
|
<div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
|
210
|
-
<div class="backtrace"><pre><a href="txmt://open?url=file:///
|
211
|
-
<a href="txmt://open?url=file:///
|
212
|
-
<a href="txmt://open?url=file:///
|
213
|
-
<a href="txmt://open?url=file:///
|
212
|
+
<div class="backtrace"><pre><a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=22">./examples/failing/mocking_example.rb:22</a>
|
213
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
214
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
215
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a>
|
216
|
+
-e:1:in `load'
|
217
|
+
-e:1</pre></div>
|
214
218
|
<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>
|
215
219
|
<span class="linenum">21</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">one</span>
|
216
220
|
<span class="offending"><span class="linenum">22</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">three</span></span>
|
@@ -223,10 +227,12 @@ a {
|
|
223
227
|
<span class="failed_spec_name">should get yelled at when sending unexpected messages</span>
|
224
228
|
<div class="failure" id="failure_3">
|
225
229
|
<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>
|
226
|
-
<div class="backtrace"><pre><a href="txmt://open?url=file:///
|
227
|
-
<a href="txmt://open?url=file:///
|
228
|
-
<a href="txmt://open?url=file:///
|
229
|
-
<a href="txmt://open?url=file:///
|
230
|
+
<div class="backtrace"><pre><a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=29">./examples/failing/mocking_example.rb:29</a>
|
231
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
232
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
233
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a>
|
234
|
+
-e:1:in `load'
|
235
|
+
-e:1</pre></div>
|
230
236
|
<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>
|
231
237
|
<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>
|
232
238
|
<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>
|
@@ -238,10 +244,12 @@ a {
|
|
238
244
|
<span class="failed_spec_name">has a bug we need to fix</span>
|
239
245
|
<div class="failure" id="failure_4">
|
240
246
|
<div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
|
241
|
-
<div class="backtrace"><pre><a href="txmt://open?url=file:///
|
242
|
-
<a href="txmt://open?url=file:///
|
243
|
-
<a href="txmt://open?url=file:///
|
244
|
-
<a href="txmt://open?url=file:///
|
247
|
+
<div class="backtrace"><pre><a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb&line=33">./examples/failing/mocking_example.rb:33</a>
|
248
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
249
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
250
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a>
|
251
|
+
-e:1:in `load'
|
252
|
+
-e:1</pre></div>
|
245
253
|
<pre class="ruby"><code><span class="linenum">31</span>
|
246
254
|
<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>
|
247
255
|
<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>
|
@@ -268,10 +276,12 @@ Diff:
|
|
268
276
|
+behavior driven development
|
269
277
|
framework for Ruby
|
270
278
|
</pre></div>
|
271
|
-
<div class="backtrace"><pre><a href="txmt://open?url=file:///
|
272
|
-
<a href="txmt://open?url=file:///
|
273
|
-
<a href="txmt://open?url=file:///
|
274
|
-
<a href="txmt://open?url=file:///
|
279
|
+
<div class="backtrace"><pre><a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb&line=13">./examples/failing/diffing_spec.rb:13</a>
|
280
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
281
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
282
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a>
|
283
|
+
-e:1:in `load'
|
284
|
+
-e:1</pre></div>
|
275
285
|
<pre class="ruby"><code><span class="linenum">11</span><span class="ident">framework</span> <span class="keyword">for</span> <span class="constant">Ruby</span>
|
276
286
|
<span class="linenum">12</span><span class="constant">EOF</span>
|
277
287
|
<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>
|
@@ -299,10 +309,12 @@ Diff:
|
|
299
309
|
+species=giraffe
|
300
310
|
>
|
301
311
|
</pre></div>
|
302
|
-
<div class="backtrace"><pre><a href="txmt://open?url=file:///
|
303
|
-
<a href="txmt://open?url=file:///
|
304
|
-
<a href="txmt://open?url=file:///
|
305
|
-
<a href="txmt://open?url=file:///
|
312
|
+
<div class="backtrace"><pre><a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb&line=34">./examples/failing/diffing_spec.rb:34</a>
|
313
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=51">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:51</a>
|
314
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a> :in `chdir'
|
315
|
+
<a href="txmt://open?url=file:///home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb&line=47">/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/text_mate_formatter_spec.rb:47</a>
|
316
|
+
-e:1:in `load'
|
317
|
+
-e:1</pre></div>
|
306
318
|
<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>
|
307
319
|
<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>
|
308
320
|
<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>
|