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
@@ -15,11 +15,11 @@ module Spec
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should add example name for each failure" do
|
18
|
-
formatter.add_example_group(Class.new(
|
19
|
-
formatter.example_failed("e 1", nil, Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
20
|
-
formatter.add_example_group(Class.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))
|
18
|
+
formatter.add_example_group(Class.new(::Spec::Example::ExampleGroupDouble).describe("b 1"))
|
19
|
+
formatter.example_failed("e 1", nil, Spec::Runner::Reporter::Failure.new("g", nil, RuntimeError.new))
|
20
|
+
formatter.add_example_group(Class.new(::Spec::Example::ExampleGroupDouble).describe("b 2"))
|
21
|
+
formatter.example_failed("e 2", nil, Spec::Runner::Reporter::Failure.new("g", nil, RuntimeError.new))
|
22
|
+
formatter.example_failed("e 3", nil, Spec::Runner::Reporter::Failure.new("g", 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, ::Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
33
|
+
formatter.example_failed("failure", nil, ::Spec::Runner::Reporter::Failure.new("g", 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
|
-
@formatter.add_example_group(Class.new(
|
39
|
-
@formatter.example_failed("e 1", nil, ::Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
38
|
+
@formatter.add_example_group(Class.new(::Spec::Example::ExampleGroupDouble).describe("something something (druby://99.99.99.99:99)"))
|
39
|
+
@formatter.example_failed("e 1", nil, ::Spec::Runner::Reporter::Failure.new("g", nil, RuntimeError.new))
|
40
40
|
io.string.should == "something something\n"
|
41
41
|
end
|
42
42
|
end
|
@@ -12,14 +12,14 @@ module Spec
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should add example name for each failure" do
|
15
|
-
example_group_1 = Class.new(
|
15
|
+
example_group_1 = Class.new(::Spec::Example::ExampleGroupDouble).describe("A")
|
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, ::Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
|
19
|
+
@formatter.example_failed(example_group_1.it("a1"){}, nil, ::Spec::Runner::Reporter::Failure.new("g", nil, RuntimeError.new))
|
20
20
|
@formatter.add_example_group(example_group_2)
|
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))
|
21
|
+
@formatter.example_failed(example_group_2.it("b2"){}, nil, ::Spec::Runner::Reporter::Failure.new("g", nil, RuntimeError.new))
|
22
|
+
@formatter.example_failed(example_group_2.it("b3"){}, nil, ::Spec::Runner::Reporter::Failure.new("g", nil, RuntimeError.new))
|
23
23
|
@io.string.should eql(<<-EOF
|
24
24
|
A a1
|
25
25
|
A B b2
|
@@ -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,7 +192,7 @@ 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
|
195
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
196
196
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
197
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
198
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
@@ -209,7 +209,7 @@ 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
|
212
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
213
213
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
214
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
215
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
@@ -226,7 +226,7 @@ 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
|
229
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
230
230
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
231
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
232
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
@@ -242,7 +242,7 @@ 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
|
245
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
246
246
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
247
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
248
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
@@ -273,7 +273,7 @@ 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
|
276
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
277
277
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
278
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
279
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
@@ -305,7 +305,7 @@ 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
|
308
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
309
309
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
310
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
311
|
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
|
@@ -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,10 +192,12 @@ 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
|
-
/
|
196
|
-
/
|
197
|
-
/
|
198
|
-
/
|
195
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/../../../spec_helper.rb:43:in `run_with'
|
196
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
197
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
198
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:
|
199
|
+
-e:1:in `load'
|
200
|
+
-e:1:</pre></div>
|
199
201
|
<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
202
|
<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
203
|
<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 +211,12 @@ a {
|
|
209
211
|
<div class="failure" id="failure_2">
|
210
212
|
<div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
|
211
213
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:22:
|
212
|
-
/
|
213
|
-
/
|
214
|
-
/
|
215
|
-
/
|
214
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/../../../spec_helper.rb:43:in `run_with'
|
215
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
216
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
217
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:
|
218
|
+
-e:1:in `load'
|
219
|
+
-e:1:</pre></div>
|
216
220
|
<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
221
|
<span class="linenum">21</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">one</span>
|
218
222
|
<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 +230,12 @@ a {
|
|
226
230
|
<div class="failure" id="failure_3">
|
227
231
|
<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
232
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:29:
|
229
|
-
/
|
230
|
-
/
|
231
|
-
/
|
232
|
-
/
|
233
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/../../../spec_helper.rb:43:in `run_with'
|
234
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
235
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
236
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:
|
237
|
+
-e:1:in `load'
|
238
|
+
-e:1:</pre></div>
|
233
239
|
<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
240
|
<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
241
|
<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 +248,12 @@ a {
|
|
242
248
|
<div class="failure" id="failure_4">
|
243
249
|
<div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
|
244
250
|
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:33:
|
245
|
-
/
|
246
|
-
/
|
247
|
-
/
|
248
|
-
/
|
251
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/../../../spec_helper.rb:43:in `run_with'
|
252
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
253
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
254
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:
|
255
|
+
-e:1:in `load'
|
256
|
+
-e:1:</pre></div>
|
249
257
|
<pre class="ruby"><code><span class="linenum">31</span>
|
250
258
|
<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
259
|
<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 +281,12 @@ Diff:
|
|
273
281
|
framework for Ruby
|
274
282
|
</pre></div>
|
275
283
|
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:13:
|
276
|
-
/
|
277
|
-
/
|
278
|
-
/
|
279
|
-
/
|
284
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/../../../spec_helper.rb:43:in `run_with'
|
285
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
286
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
287
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:
|
288
|
+
-e:1:in `load'
|
289
|
+
-e:1:</pre></div>
|
280
290
|
<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
291
|
<span class="linenum">12</span><span class="constant">EOF</span>
|
282
292
|
<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 +315,12 @@ Diff:
|
|
305
315
|
>
|
306
316
|
</pre></div>
|
307
317
|
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:
|
308
|
-
/
|
309
|
-
/
|
310
|
-
/
|
311
|
-
/
|
318
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/../../../spec_helper.rb:43:in `run_with'
|
319
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
|
320
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
|
321
|
+
/home/btakita/workspace/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:
|
322
|
+
-e:1:in `load'
|
323
|
+
-e:1:</pre></div>
|
312
324
|
<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
325
|
<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
326
|
<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 {
|
@@ -192,15 +192,16 @@ 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>/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb:13:in `block (2 levels) in <top (required)>'
|
195
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec
|
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:
|
199
|
-
<pre class="ruby"><code><span class="linenum">11</span>
|
200
|
-
<span class="linenum">12</span>
|
201
|
-
<span class="offending"><span class="linenum">13</span>
|
202
|
-
<span class="linenum">14</span>
|
203
|
-
<span class="linenum">15</span>
|
195
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
196
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:37:in `block (4 levels) in <module:Formatter>'
|
197
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `chdir'
|
198
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `block (3 levels) in <module:Formatter>'</pre></div>
|
199
|
+
<pre class="ruby"><code><span class="linenum">11</span> it "should fail when expected message not received" do
|
200
|
+
<span class="linenum">12</span> mock = mock("poke me")
|
201
|
+
<span class="offending"><span class="linenum">13</span> mock.should_receive(:poke)</span>
|
202
|
+
<span class="linenum">14</span> end
|
203
|
+
<span class="linenum">15</span>
|
204
|
+
<span class="linenum">16</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
204
205
|
</div>
|
205
206
|
</dd>
|
206
207
|
<script type="text/javascript">moveProgressBar('17.6');</script>
|
@@ -209,15 +210,16 @@ a {
|
|
209
210
|
<div class="failure" id="failure_2">
|
210
211
|
<div class="message"><pre>Mock 'one two three' received :three out of order</pre></div>
|
211
212
|
<div class="backtrace"><pre>/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb:22:in `block (2 levels) in <top (required)>'
|
212
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec
|
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:
|
216
|
-
<pre class="ruby"><code><span class="linenum">20</span>
|
217
|
-
<span class="linenum">21</span>
|
218
|
-
<span class="offending"><span class="linenum">22</span>
|
219
|
-
<span class="linenum">23</span>
|
220
|
-
<span class="linenum">24</span>
|
213
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
214
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:37:in `block (4 levels) in <module:Formatter>'
|
215
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `chdir'
|
216
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `block (3 levels) in <module:Formatter>'</pre></div>
|
217
|
+
<pre class="ruby"><code><span class="linenum">20</span> mock.should_receive(:three).ordered
|
218
|
+
<span class="linenum">21</span> mock.one
|
219
|
+
<span class="offending"><span class="linenum">22</span> mock.three</span>
|
220
|
+
<span class="linenum">23</span> mock.two
|
221
|
+
<span class="linenum">24</span> end
|
222
|
+
<span class="linenum">25</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
221
223
|
</div>
|
222
224
|
</dd>
|
223
225
|
<script type="text/javascript">moveProgressBar('23.5');</script>
|
@@ -226,14 +228,16 @@ a {
|
|
226
228
|
<div class="failure" id="failure_3">
|
227
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>
|
228
230
|
<div class="backtrace"><pre>/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb:29:in `block (2 levels) in <top (required)>'
|
229
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec
|
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:
|
233
|
-
<pre class="ruby"><code><span class="linenum">27</span>
|
234
|
-
<span class="linenum">28</span>
|
235
|
-
<span class="offending"><span class="linenum">29</span>
|
236
|
-
<span class="linenum">30</span>
|
231
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
232
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:37:in `block (4 levels) in <module:Formatter>'
|
233
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `chdir'
|
234
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `block (3 levels) in <module:Formatter>'</pre></div>
|
235
|
+
<pre class="ruby"><code><span class="linenum">27</span> mock = mock("don't talk to me")
|
236
|
+
<span class="linenum">28</span> mock.should_not_receive(:any_message_at_all)
|
237
|
+
<span class="offending"><span class="linenum">29</span> mock.any_message_at_all</span>
|
238
|
+
<span class="linenum">30</span> end
|
239
|
+
<span class="linenum">31</span>
|
240
|
+
<span class="linenum">32</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
237
241
|
</div>
|
238
242
|
</dd>
|
239
243
|
<script type="text/javascript">moveProgressBar('29.4');</script>
|
@@ -242,15 +246,16 @@ a {
|
|
242
246
|
<div class="failure" id="failure_4">
|
243
247
|
<div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
|
244
248
|
<div class="backtrace"><pre>/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/mocking_example.rb:33:in `block (2 levels) in <top (required)>'
|
245
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec
|
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:
|
249
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
250
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:37:in `block (4 levels) in <module:Formatter>'
|
251
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `chdir'
|
252
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `block (3 levels) in <module:Formatter>'</pre></div>
|
249
253
|
<pre class="ruby"><code><span class="linenum">31</span>
|
250
|
-
<span class="linenum">32</span>
|
251
|
-
<span class="offending"><span class="linenum">33</span>
|
252
|
-
<span class="linenum">34</span>
|
253
|
-
<span class="linenum">35</span>
|
254
|
+
<span class="linenum">32</span> it "has a bug we need to fix" do
|
255
|
+
<span class="offending"><span class="linenum">33</span> pending "here is the bug" do</span>
|
256
|
+
<span class="linenum">34</span> # Actually, no. It's fixed. This will fail because it passes :-)
|
257
|
+
<span class="linenum">35</span> mock = mock("Bug")
|
258
|
+
<span class="linenum">36</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
254
259
|
</div>
|
255
260
|
</dd>
|
256
261
|
</dl>
|
@@ -273,14 +278,16 @@ Diff:
|
|
273
278
|
framework for Ruby
|
274
279
|
</pre></div>
|
275
280
|
<div class="backtrace"><pre>/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb:13:in `block (2 levels) in <top (required)>'
|
276
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec
|
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:
|
280
|
-
<pre class="ruby"><code><span class="linenum">11</span
|
281
|
-
<span class="linenum">12</span
|
282
|
-
<span class="offending"><span class="linenum">13</span>
|
283
|
-
<span class="linenum">14</span>
|
281
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
282
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:37:in `block (4 levels) in <module:Formatter>'
|
283
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `chdir'
|
284
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `block (3 levels) in <module:Formatter>'</pre></div>
|
285
|
+
<pre class="ruby"><code><span class="linenum">11</span>framework for Ruby
|
286
|
+
<span class="linenum">12</span>EOF
|
287
|
+
<span class="offending"><span class="linenum">13</span> usa.should == uk</span>
|
288
|
+
<span class="linenum">14</span> end
|
289
|
+
<span class="linenum">15</span>
|
290
|
+
<span class="linenum">16</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
284
291
|
</div>
|
285
292
|
</dd>
|
286
293
|
<script type="text/javascript">moveProgressBar('41.1');</script>
|
@@ -305,15 +312,16 @@ Diff:
|
|
305
312
|
>
|
306
313
|
</pre></div>
|
307
314
|
<div class="backtrace"><pre>/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/examples/failing/diffing_spec.rb:34:in `block (2 levels) in <top (required)>'
|
308
|
-
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec
|
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:
|
312
|
-
<pre class="ruby"><code><span class="linenum">32</span>
|
313
|
-
<span class="linenum">33</span>
|
314
|
-
<span class="offending"><span class="linenum">34</span>
|
315
|
-
<span class="linenum">35</span>
|
316
|
-
<span class="linenum">36</span
|
315
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/../spec_helper.rb:43:in `run_with'
|
316
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:37:in `block (4 levels) in <module:Formatter>'
|
317
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `chdir'
|
318
|
+
/Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:25:in `block (3 levels) in <module:Formatter>'</pre></div>
|
319
|
+
<pre class="ruby"><code><span class="linenum">32</span> expected = Animal.new "bob", "giraffe"
|
320
|
+
<span class="linenum">33</span> actual = Animal.new "bob", "tortoise"
|
321
|
+
<span class="offending"><span class="linenum">34</span> expected.should eql(actual)</span>
|
322
|
+
<span class="linenum">35</span> end
|
323
|
+
<span class="linenum">36</span>end
|
324
|
+
<span class="linenum">37</span><span class="comment"># gem install syntax to get syntax highlighting</span></code></pre>
|
317
325
|
</div>
|
318
326
|
</dd>
|
319
327
|
</dl>
|
@@ -1,62 +1,114 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../../../spec_helper'
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
return
|
7
|
-
end
|
2
|
+
|
3
|
+
begin # See rescue all the way at the bottom
|
4
|
+
|
5
|
+
require 'nokogiri' # Needed to compare generated with wanted HTML
|
8
6
|
require 'spec/runner/formatter/html_formatter'
|
9
7
|
|
10
8
|
module Spec
|
11
9
|
module Runner
|
12
10
|
module Formatter
|
13
11
|
describe HtmlFormatter do
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
12
|
+
attr_reader :root, :expected_file, :expected_html
|
13
|
+
before do
|
14
|
+
@root = File.expand_path("#{File.dirname(__FILE__)}/../../../..")
|
15
|
+
suffix = jruby? ? '-jruby' : ''
|
16
|
+
@expected_file = "#{File.dirname(__FILE__)}/html_formatted-#{::RUBY_VERSION}#{suffix}.html"
|
17
|
+
raise "There is no HTML file with expected content for this platform: #{expected_file}" unless File.file?(expected_file)
|
18
|
+
@expected_html = File.read(expected_file)
|
19
|
+
end
|
20
|
+
|
21
|
+
# # Uncomment this line temporarily in order to overwrite the expected with actual.
|
22
|
+
# # Use with care!!!
|
23
|
+
# describe "file generator" do
|
24
|
+
# it "generates a new comparison file" do
|
25
|
+
# Dir.chdir(root) do
|
26
|
+
# args = [
|
27
|
+
# 'examples/failing/mocking_example.rb',
|
28
|
+
# 'examples/failing/diffing_spec.rb',
|
29
|
+
# 'examples/passing/stubbing_example.rb',
|
30
|
+
# 'examples/passing/pending_example.rb',
|
31
|
+
# '--format',
|
32
|
+
# 'html',
|
33
|
+
# "--diff"
|
34
|
+
# ]
|
35
|
+
# err = StringIO.new
|
36
|
+
# out = StringIO.new
|
37
|
+
# run_with ::Spec::Runner::OptionParser.parse(args, err, out)
|
38
|
+
#
|
39
|
+
# seconds = /\d+\.\d+ seconds/
|
40
|
+
# html = out.string.gsub seconds, 'x seconds'
|
41
|
+
#
|
42
|
+
# File.open(expected_file, 'w') {|io| io.write(html)}
|
43
|
+
# end
|
44
|
+
# end
|
45
|
+
# end
|
46
|
+
|
47
|
+
it "should produce HTML identical to the one we designed manually with --diff" do
|
48
|
+
Dir.chdir(root) do
|
49
|
+
args = [
|
50
|
+
'examples/failing/mocking_example.rb',
|
51
|
+
'examples/failing/diffing_spec.rb',
|
52
|
+
'examples/passing/stubbing_example.rb',
|
53
|
+
'examples/passing/pending_example.rb',
|
54
|
+
'--format',
|
55
|
+
'html',
|
56
|
+
"--diff"
|
57
|
+
]
|
58
|
+
err = StringIO.new
|
59
|
+
out = StringIO.new
|
60
|
+
run_with ::Spec::Runner::OptionParser.parse(args, err, out)
|
61
|
+
|
62
|
+
seconds = /\d+\.\d+ seconds/
|
63
|
+
html = out.string.gsub seconds, 'x seconds'
|
64
|
+
expected_html.gsub! seconds, 'x seconds'
|
65
|
+
|
66
|
+
doc = Nokogiri::HTML(html)
|
67
|
+
backtraces = doc.search("div.backtrace").collect {|e| e.at("pre").inner_html}
|
68
|
+
doc.css("div.backtrace").remove
|
69
|
+
|
70
|
+
expected_doc = Nokogiri::HTML(expected_html)
|
71
|
+
expected_backtraces = expected_doc.search("div.backtrace").collect {|e| e.at("pre").inner_html}
|
72
|
+
expected_doc.search("div.backtrace").remove
|
73
|
+
|
74
|
+
doc.inner_html.should == expected_doc.inner_html
|
75
|
+
|
76
|
+
expected_backtraces.each_with_index do |expected_line, i|
|
77
|
+
expected_path, expected_line_number, expected_suffix = expected_line.split(':')
|
78
|
+
actual_path, actual_line_number, actual_suffix = backtraces[i].split(':')
|
79
|
+
File.expand_path(actual_path).should == File.expand_path(expected_path)
|
80
|
+
actual_line_number.should == expected_line_number
|
56
81
|
end
|
57
82
|
end
|
58
83
|
end
|
84
|
+
|
85
|
+
it "should produce HTML identical to the one we designed manually with --dry-run" do
|
86
|
+
Dir.chdir(root) do
|
87
|
+
args = [
|
88
|
+
'examples/failing/mocking_example.rb',
|
89
|
+
'examples/failing/diffing_spec.rb',
|
90
|
+
'examples/passing/stubbing_example.rb',
|
91
|
+
'examples/passing/pending_example.rb',
|
92
|
+
'--format',
|
93
|
+
'html',
|
94
|
+
"--dry-run"
|
95
|
+
]
|
96
|
+
err = StringIO.new
|
97
|
+
out = StringIO.new
|
98
|
+
run_with ::Spec::Runner::OptionParser.parse(args, err, out)
|
99
|
+
|
100
|
+
seconds = /\d+\.\d+ seconds/
|
101
|
+
html = out.string.gsub seconds, 'x seconds'
|
102
|
+
expected_html.gsub! seconds, 'x seconds'
|
103
|
+
|
104
|
+
html.should =~ /This was a dry-run/m
|
105
|
+
end
|
106
|
+
end
|
59
107
|
end
|
60
108
|
end
|
61
109
|
end
|
62
110
|
end
|
111
|
+
|
112
|
+
rescue LoadError
|
113
|
+
warn "nokogiri not loaded -- skipping HtmlFormatter specs"
|
114
|
+
end
|