rspec 1.1.12 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. data/.autotest +2 -1
  2. data/.document +7 -0
  3. data/History.txt +58 -0
  4. data/License.txt +1 -1
  5. data/Manifest.txt +45 -82
  6. data/README.txt +3 -6
  7. data/Rakefile +33 -13
  8. data/Ruby1.9.markdown +32 -0
  9. data/TODO.txt +10 -4
  10. data/Upgrade.markdown +63 -0
  11. data/bin/spec +1 -1
  12. data/cucumber.yml +3 -0
  13. data/examples/failing/{failing_autogenerated_docstrings_example.rb → failing_implicit_docstrings_example.rb} +0 -0
  14. data/examples/failing/pending_example.rb +9 -0
  15. data/examples/failing/spec_helper.rb +1 -1
  16. data/examples/passing/{custom_expectation_matchers.rb → custom_matchers.rb} +0 -0
  17. data/examples/passing/filtered_formatter.rb +18 -0
  18. data/examples/passing/filtered_formatter_example.rb +31 -0
  19. data/examples/passing/implicit_docstrings_example.rb +18 -0
  20. data/examples/passing/spec_helper.rb +1 -1
  21. data/examples/ruby1.9.compatibility/access_to_constants_spec.rb +17 -18
  22. data/features/before_and_after_blocks/before_and_after_blocks.feature +4 -4
  23. data/features/example_groups/example_group_with_should_methods.feature +1 -1
  24. data/features/example_groups/{autogenerated_docstrings.feature → implicit_docstrings.feature} +7 -9
  25. data/features/example_groups/nested_groups.feature +1 -1
  26. data/features/heckle/heckle.feature +56 -0
  27. data/features/interop/examples_and_tests_together.feature +1 -1
  28. data/features/interop/test_but_not_test_unit.feature +1 -1
  29. data/features/interop/test_case_with_should_methods.feature +1 -1
  30. data/features/matchers/create_matcher.feature +115 -0
  31. data/features/mock_framework_integration/use_flexmock.feature +22 -4
  32. data/features/mock_framework_integration/use_mocha.feature +27 -0
  33. data/features/mock_framework_integration/use_rr.feature +27 -0
  34. data/features/mocks/mix_stubs_and_mocks.feature +22 -0
  35. data/features/pending/pending_examples.feature +81 -0
  36. data/features/step_definitions/running_rspec.rb +5 -3
  37. data/features/support/env.rb +1 -1
  38. data/features/support/matchers/smart_match.rb +2 -2
  39. data/lib/autotest/rspec.rb +1 -1
  40. data/lib/spec.rb +1 -1
  41. data/lib/{adapters → spec/adapters}/mock_frameworks/flexmock.rb +0 -0
  42. data/lib/{adapters → spec/adapters}/mock_frameworks/mocha.rb +0 -0
  43. data/lib/{adapters → spec/adapters}/mock_frameworks/rr.rb +0 -0
  44. data/lib/{adapters → spec/adapters}/mock_frameworks/rspec.rb +0 -1
  45. data/lib/spec/autorun.rb +3 -0
  46. data/lib/spec/dsl.rb +3 -1
  47. data/lib/spec/dsl/matchers.rb +13 -0
  48. data/lib/spec/example.rb +4 -0
  49. data/lib/spec/example/before_and_after_hooks.rb +5 -20
  50. data/lib/spec/example/errors.rb +3 -3
  51. data/lib/spec/example/example_description.rb +15 -0
  52. data/lib/spec/example/example_group.rb +0 -15
  53. data/lib/spec/example/example_group_factory.rb +34 -46
  54. data/lib/spec/example/example_group_hierarchy.rb +53 -0
  55. data/lib/spec/example/example_group_methods.rb +101 -211
  56. data/lib/spec/example/example_methods.rb +61 -81
  57. data/lib/spec/example/module_reopening_fix.rb +23 -1
  58. data/lib/spec/example/pending.rb +3 -2
  59. data/lib/spec/example/predicate_matchers.rb +47 -0
  60. data/lib/spec/example/subject.rb +91 -0
  61. data/lib/spec/expectations.rb +1 -1
  62. data/lib/spec/expectations/differs/default.rb +0 -1
  63. data/lib/spec/expectations/extensions.rb +0 -1
  64. data/lib/spec/expectations/handler.rb +13 -6
  65. data/lib/spec/interop/test.rb +5 -0
  66. data/lib/spec/interop/test/unit/testcase.rb +5 -22
  67. data/lib/spec/matchers.rb +22 -8
  68. data/lib/spec/matchers/be.rb +4 -9
  69. data/lib/spec/matchers/be_close.rb +20 -5
  70. data/lib/spec/matchers/be_instance_of.rb +45 -0
  71. data/lib/spec/matchers/be_kind_of.rb +45 -0
  72. data/lib/spec/matchers/change.rb +8 -6
  73. data/lib/spec/matchers/compatibility.rb +14 -0
  74. data/lib/spec/matchers/eql.rb +24 -6
  75. data/lib/spec/matchers/equal.rb +24 -6
  76. data/lib/spec/matchers/exist.rb +21 -5
  77. data/lib/spec/matchers/extensions/instance_exec.rb +25 -0
  78. data/lib/spec/matchers/generated_descriptions.rb +2 -2
  79. data/lib/spec/matchers/has.rb +28 -11
  80. data/lib/spec/matchers/have.rb +2 -2
  81. data/lib/spec/matchers/include.rb +2 -2
  82. data/lib/spec/matchers/match.rb +25 -7
  83. data/lib/spec/matchers/match_array.rb +3 -3
  84. data/lib/spec/matchers/matcher.rb +51 -0
  85. data/lib/spec/matchers/method_missing.rb +2 -2
  86. data/lib/spec/matchers/operator_matcher.rb +12 -5
  87. data/lib/spec/matchers/raise_error.rb +3 -3
  88. data/lib/spec/matchers/respond_to.rb +3 -3
  89. data/lib/spec/matchers/satisfy.rb +7 -7
  90. data/lib/spec/matchers/throw_symbol.rb +3 -5
  91. data/lib/spec/mocks.rb +3 -3
  92. data/lib/spec/mocks/argument_expectation.rb +15 -15
  93. data/lib/spec/mocks/{argument_constraints.rb → argument_matchers.rb} +19 -23
  94. data/lib/spec/mocks/error_generator.rb +5 -8
  95. data/lib/spec/mocks/framework.rb +1 -1
  96. data/lib/spec/mocks/message_expectation.rb +5 -13
  97. data/lib/spec/mocks/mock.rb +4 -5
  98. data/lib/spec/mocks/proxy.rb +9 -5
  99. data/lib/spec/mocks/spec_methods.rb +10 -1
  100. data/lib/spec/rake/spectask.rb +0 -1
  101. data/lib/spec/runner.rb +6 -28
  102. data/lib/spec/runner/configuration.rb +3 -3
  103. data/lib/spec/runner/drb_command_line.rb +2 -1
  104. data/lib/spec/runner/example_group_runner.rb +3 -2
  105. data/lib/spec/runner/formatter/base_text_formatter.rb +34 -19
  106. data/lib/spec/runner/formatter/failing_example_groups_formatter.rb +3 -5
  107. data/lib/spec/runner/formatter/html_formatter.rb +2 -3
  108. data/lib/spec/runner/formatter/nested_text_formatter.rb +7 -25
  109. data/lib/spec/runner/formatter/progress_bar_formatter.rb +1 -1
  110. data/lib/spec/runner/formatter/snippet_extractor.rb +1 -1
  111. data/lib/spec/runner/formatter/specdoc_formatter.rb +1 -7
  112. data/lib/spec/runner/heckle_runner.rb +3 -6
  113. data/lib/spec/runner/heckle_runner_unsupported.rb +1 -1
  114. data/lib/spec/runner/option_parser.rb +19 -21
  115. data/lib/spec/runner/options.rb +32 -27
  116. data/lib/spec/runner/reporter.rb +8 -9
  117. data/lib/spec/test/unit.rb +10 -0
  118. data/lib/spec/version.rb +2 -2
  119. data/{features/support → resources}/helpers/cmdline.rb +2 -2
  120. data/resources/rake/verify_rcov.rake +1 -1
  121. data/resources/spec/example_group_with_should_methods.rb +1 -1
  122. data/resources/spec/simple_spec.rb +1 -1
  123. data/resources/test/spec_and_test_together.rb +2 -3
  124. data/resources/test/spec_including_test_but_not_unit.rb +1 -1
  125. data/resources/test/test_case_with_should_methods.rb +2 -3
  126. data/spec/autotest/autotest_helper.rb +0 -1
  127. data/spec/autotest/rspec_spec.rb +95 -98
  128. data/spec/spec/dsl/main_spec.rb +3 -3
  129. data/spec/spec/dsl/matchers_spec.rb +25 -0
  130. data/spec/spec/example/example_group_class_definition_spec.rb +14 -15
  131. data/spec/spec/example/example_group_factory_spec.rb +31 -44
  132. data/spec/spec/example/example_group_methods_spec.rb +86 -52
  133. data/spec/spec/example/example_group_spec.rb +32 -79
  134. data/spec/spec/example/example_matcher_spec.rb +10 -10
  135. data/spec/spec/example/example_methods_spec.rb +108 -242
  136. data/spec/spec/example/nested_example_group_spec.rb +2 -2
  137. data/spec/spec/example/pending_module_spec.rb +66 -41
  138. data/spec/spec/example/shared_example_group_spec.rb +4 -4
  139. data/spec/spec/{matchers → expectations}/handler_spec.rb +52 -4
  140. data/spec/spec/interop/test/unit/resources/spec_that_fails.rb +2 -2
  141. data/spec/spec/interop/test/unit/resources/spec_that_passes.rb +2 -2
  142. data/spec/spec/interop/test/unit/resources/spec_with_errors.rb +2 -2
  143. data/spec/spec/interop/test/unit/resources/spec_with_options_hash.rb +2 -2
  144. data/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +2 -2
  145. data/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +2 -2
  146. data/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +2 -2
  147. data/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +2 -2
  148. data/spec/spec/interop/test/unit/testcase_spec.rb +0 -4
  149. data/spec/spec/matchers/be_close_spec.rb +1 -1
  150. data/spec/spec/matchers/be_instance_of_spec.rb +29 -0
  151. data/spec/spec/matchers/be_kind_of_spec.rb +29 -0
  152. data/spec/spec/matchers/change_spec.rb +20 -0
  153. data/spec/spec/matchers/compatibility_spec.rb +34 -0
  154. data/spec/spec/matchers/description_generation_spec.rb +0 -12
  155. data/spec/spec/matchers/eql_spec.rb +2 -2
  156. data/spec/spec/matchers/equal_spec.rb +2 -2
  157. data/spec/spec/matchers/exist_spec.rb +8 -4
  158. data/spec/spec/matchers/have_spec.rb +4 -4
  159. data/spec/spec/matchers/match_spec.rb +2 -2
  160. data/spec/spec/matchers/matcher_methods_spec.rb +1 -1
  161. data/spec/spec/matchers/matcher_spec.rb +97 -0
  162. data/spec/spec/matchers/throw_symbol_spec.rb +8 -8
  163. data/spec/spec/mocks/{bug_report_496.rb → bug_report_496_spec.rb} +0 -0
  164. data/spec/spec/mocks/{failing_mock_argument_constraints_spec.rb → failing_argument_matchers_spec.rb} +2 -2
  165. data/spec/spec/mocks/hash_including_matcher_spec.rb +4 -4
  166. data/spec/spec/mocks/hash_not_including_matcher_spec.rb +3 -3
  167. data/spec/spec/mocks/mock_spec.rb +27 -2
  168. data/spec/spec/mocks/nil_expectation_warning_spec.rb +1 -1
  169. data/spec/spec/mocks/partial_mock_spec.rb +18 -3
  170. data/spec/spec/mocks/{passing_mock_argument_constraints_spec.rb → passing_argument_matchers_spec.rb} +6 -6
  171. data/spec/spec/mocks/stubbed_message_expectations_spec.rb +13 -1
  172. data/spec/spec/package/bin_spec_spec.rb +2 -2
  173. data/spec/spec/runner/configuration_spec.rb +12 -12
  174. data/spec/spec/runner/drb_command_line_spec.rb +71 -73
  175. data/spec/spec/runner/formatter/base_text_formatter_spec.rb +82 -1
  176. data/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +8 -8
  177. data/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +4 -4
  178. data/spec/spec/runner/formatter/html_formatted-1.8.6.html +8 -8
  179. data/spec/spec/runner/formatter/html_formatted-1.8.7.html +38 -26
  180. data/spec/spec/runner/formatter/html_formatted-1.9.1.html +61 -53
  181. data/spec/spec/runner/formatter/html_formatter_spec.rb +100 -48
  182. data/spec/spec/runner/formatter/nested_text_formatter_spec.rb +20 -34
  183. data/spec/spec/runner/formatter/profile_formatter_spec.rb +2 -1
  184. data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +9 -6
  185. data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +6 -6
  186. data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +20 -20
  187. data/spec/spec/runner/formatter/text_mate_formatted-1.8.7.html +38 -26
  188. data/spec/spec/runner/formatter/text_mate_formatted-1.9.1.html +55 -47
  189. data/spec/spec/runner/formatter/{spec_mate_formatter_spec.rb → text_mate_formatter_spec.rb} +11 -9
  190. data/spec/spec/runner/heckle_runner_spec.rb +1 -1
  191. data/spec/spec/runner/heckler_spec.rb +1 -1
  192. data/spec/spec/runner/option_parser_spec.rb +28 -11
  193. data/spec/spec/runner/options_spec.rb +34 -0
  194. data/spec/spec/runner/reporter_spec.rb +66 -62
  195. data/spec/spec/runner/resources/utf8_encoded.rb +1 -0
  196. data/spec/spec/runner/spec_drb.opts +1 -0
  197. data/spec/spec/runner_spec.rb +7 -5
  198. data/spec/spec_helper.rb +24 -2
  199. metadata +49 -90
  200. data/examples/passing/autogenerated_docstrings_example.rb +0 -25
  201. data/examples/passing/before_and_after_example.rb +0 -40
  202. data/examples/passing/behave_as_example.rb +0 -45
  203. data/examples/passing/legacy_spec.rb +0 -11
  204. data/examples/passing/priority.txt +0 -1
  205. data/features/support/helpers/story_helper.rb +0 -16
  206. data/lib/spec/expectations/extensions/string_and_symbol.rb +0 -17
  207. data/lib/spec/runner/formatter/story/html_formatter.rb +0 -174
  208. data/lib/spec/runner/formatter/story/plain_text_formatter.rb +0 -194
  209. data/lib/spec/runner/formatter/story/progress_bar_formatter.rb +0 -42
  210. data/lib/spec/story.rb +0 -10
  211. data/lib/spec/story/extensions.rb +0 -3
  212. data/lib/spec/story/extensions/main.rb +0 -86
  213. data/lib/spec/story/extensions/regexp.rb +0 -9
  214. data/lib/spec/story/extensions/string.rb +0 -9
  215. data/lib/spec/story/given_scenario.rb +0 -14
  216. data/lib/spec/story/runner.rb +0 -57
  217. data/lib/spec/story/runner/plain_text_story_runner.rb +0 -48
  218. data/lib/spec/story/runner/scenario_collector.rb +0 -18
  219. data/lib/spec/story/runner/scenario_runner.rb +0 -54
  220. data/lib/spec/story/runner/story_mediator.rb +0 -137
  221. data/lib/spec/story/runner/story_parser.rb +0 -247
  222. data/lib/spec/story/runner/story_runner.rb +0 -74
  223. data/lib/spec/story/scenario.rb +0 -14
  224. data/lib/spec/story/step.rb +0 -70
  225. data/lib/spec/story/step_group.rb +0 -89
  226. data/lib/spec/story/step_mother.rb +0 -38
  227. data/lib/spec/story/story.rb +0 -39
  228. data/lib/spec/story/world.rb +0 -124
  229. data/resources/spec/spec_with_flexmock.rb +0 -19
  230. data/rspec.gemspec +0 -32
  231. data/spec/spec/matchers/mock_constraint_matchers_spec.rb +0 -24
  232. data/spec/spec/runner/formatter/story/html_formatter_spec.rb +0 -135
  233. data/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +0 -600
  234. data/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb +0 -82
  235. data/spec/spec/spec_spec.rb +0 -21
  236. data/spec/spec/story/builders.rb +0 -46
  237. data/spec/spec/story/extensions/main_spec.rb +0 -161
  238. data/spec/spec/story/extensions_spec.rb +0 -14
  239. data/spec/spec/story/given_scenario_spec.rb +0 -27
  240. data/spec/spec/story/runner/plain_text_story_runner_spec.rb +0 -90
  241. data/spec/spec/story/runner/scenario_collector_spec.rb +0 -27
  242. data/spec/spec/story/runner/scenario_runner_spec.rb +0 -214
  243. data/spec/spec/story/runner/story_mediator_spec.rb +0 -143
  244. data/spec/spec/story/runner/story_parser_spec.rb +0 -401
  245. data/spec/spec/story/runner/story_runner_spec.rb +0 -294
  246. data/spec/spec/story/runner_spec.rb +0 -93
  247. data/spec/spec/story/scenario_spec.rb +0 -18
  248. data/spec/spec/story/step_group_spec.rb +0 -157
  249. data/spec/spec/story/step_mother_spec.rb +0 -84
  250. data/spec/spec/story/step_spec.rb +0 -272
  251. data/spec/spec/story/story_helper.rb +0 -2
  252. data/spec/spec/story/story_spec.rb +0 -84
  253. data/spec/spec/story/world_spec.rb +0 -423
  254. data/story_server/prototype/javascripts/builder.js +0 -136
  255. data/story_server/prototype/javascripts/controls.js +0 -972
  256. data/story_server/prototype/javascripts/dragdrop.js +0 -976
  257. data/story_server/prototype/javascripts/effects.js +0 -1117
  258. data/story_server/prototype/javascripts/prototype.js +0 -4140
  259. data/story_server/prototype/javascripts/rspec.js +0 -149
  260. data/story_server/prototype/javascripts/scriptaculous.js +0 -58
  261. data/story_server/prototype/javascripts/slider.js +0 -276
  262. data/story_server/prototype/javascripts/sound.js +0 -55
  263. data/story_server/prototype/javascripts/unittest.js +0 -568
  264. data/story_server/prototype/lib/server.rb +0 -24
  265. data/story_server/prototype/stories.html +0 -176
  266. data/story_server/prototype/stylesheets/rspec.css +0 -136
  267. 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(ExampleGroup).describe("b 1"))
19
- formatter.example_failed("e 1", nil, Spec::Runner::Reporter::Failure.new(nil, RuntimeError.new))
20
- formatter.add_example_group(Class.new(ExampleGroup).describe("b 2"))
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(ExampleGroup).describe("something something (druby://99.99.99.99:99)"))
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(ExampleGroup).describe("A")
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: 42px;
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
- float: left;
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
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
  &gt;
306
306
  </pre></div>
307
307
  <div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:
308
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
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: 42px;
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
- float: left;
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
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
196
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
197
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
198
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
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">&quot;</span><span class="string">should fail when expected message not received</span><span class="punct">&quot;</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">(&quot;</span><span class="string">poke me</span><span class="punct">&quot;)</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
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
213
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
214
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
215
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
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
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
230
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
231
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
232
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
233
+ /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">(&quot;</span><span class="string">don't talk to me</span><span class="punct">&quot;)</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
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
246
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
247
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
248
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
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">&quot;</span><span class="string">has a bug we need to fix</span><span class="punct">&quot;</span> <span class="keyword">do</span>
251
259
  <span class="offending"><span class="linenum">33</span> <span class="ident">pending</span> <span class="punct">&quot;</span><span class="string">here is the bug</span><span class="punct">&quot;</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
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
277
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
278
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
279
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
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
  &gt;
306
316
  </pre></div>
307
317
  <div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:
308
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
309
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:
310
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
311
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:</pre></div>
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">&quot;</span><span class="string">bob</span><span class="punct">&quot;,</span> <span class="punct">&quot;</span><span class="string">giraffe</span><span class="punct">&quot;</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">&quot;</span><span class="string">bob</span><span class="punct">&quot;,</span> <span class="punct">&quot;</span><span class="string">tortoise</span><span class="punct">&quot;</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: 42px;
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
- float: left;
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
196
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26: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:22:in `chdir'
198
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `block (3 levels) in <module:Formatter>'</pre></div>
199
- <pre class="ruby"><code><span class="linenum">11</span> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">should fail when expected message not received</span><span class="punct">&quot;</span> <span class="keyword">do</span>
200
- <span class="linenum">12</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">(&quot;</span><span class="string">poke me</span><span class="punct">&quot;)</span>
201
- <span class="offending"><span class="linenum">13</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_receive</span><span class="punct">(</span><span class="symbol">:poke</span><span class="punct">)</span></span>
202
- <span class="linenum">14</span> <span class="keyword">end</span>
203
- <span class="linenum">15</span> </code></pre>
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
213
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `block (4 levels) in <module:Formatter>'
214
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
215
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `block (3 levels) in <module:Formatter>'</pre></div>
216
- <pre class="ruby"><code><span class="linenum">20</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_receive</span><span class="punct">(</span><span class="symbol">:three</span><span class="punct">).</span><span class="ident">ordered</span>
217
- <span class="linenum">21</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">one</span>
218
- <span class="offending"><span class="linenum">22</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">three</span></span>
219
- <span class="linenum">23</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">two</span>
220
- <span class="linenum">24</span> <span class="keyword">end</span></code></pre>
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
230
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `block (4 levels) in <module:Formatter>'
231
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
232
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `block (3 levels) in <module:Formatter>'</pre></div>
233
- <pre class="ruby"><code><span class="linenum">27</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">(&quot;</span><span class="string">don't talk to me</span><span class="punct">&quot;)</span>
234
- <span class="linenum">28</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_not_receive</span><span class="punct">(</span><span class="symbol">:any_message_at_all</span><span class="punct">)</span>
235
- <span class="offending"><span class="linenum">29</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">any_message_at_all</span></span>
236
- <span class="linenum">30</span> <span class="keyword">end</span></code></pre>
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
246
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `block (4 levels) in <module:Formatter>'
247
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
248
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `block (3 levels) in <module:Formatter>'</pre></div>
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> <span class="ident">it</span> <span class="punct">&quot;</span><span class="string">has a bug we need to fix</span><span class="punct">&quot;</span> <span class="keyword">do</span>
251
- <span class="offending"><span class="linenum">33</span> <span class="ident">pending</span> <span class="punct">&quot;</span><span class="string">here is the bug</span><span class="punct">&quot;</span> <span class="keyword">do</span></span>
252
- <span class="linenum">34</span> <span class="comment"># Actually, no. It's fixed. This will fail because it passes :-)</span>
253
- <span class="linenum">35</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">(&quot;</span><span class="string">Bug</span><span class="punct">&quot;)</span></code></pre>
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
277
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `block (4 levels) in <module:Formatter>'
278
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
279
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `block (3 levels) in <module:Formatter>'</pre></div>
280
- <pre class="ruby"><code><span class="linenum">11</span><span class="ident">framework</span> <span class="keyword">for</span> <span class="constant">Ruby</span>
281
- <span class="linenum">12</span><span class="constant">EOF</span>
282
- <span class="offending"><span class="linenum">13</span> <span class="ident">usa</span><span class="punct">.</span><span class="ident">should</span> <span class="punct">==</span> <span class="ident">uk</span></span>
283
- <span class="linenum">14</span> <span class="keyword">end</span></code></pre>
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
  &gt;
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/runner/formatter/story/../../../../spec_helper.rb:44:in `run_with'
309
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:26:in `block (4 levels) in <module:Formatter>'
310
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `chdir'
311
- /Users/david/projects/ruby/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/formatter/html_formatter_spec.rb:22:in `block (3 levels) in <module:Formatter>'</pre></div>
312
- <pre class="ruby"><code><span class="linenum">32</span> <span class="ident">expected</span> <span class="punct">=</span> <span class="constant">Animal</span><span class="punct">.</span><span class="ident">new</span> <span class="punct">&quot;</span><span class="string">bob</span><span class="punct">&quot;,</span> <span class="punct">&quot;</span><span class="string">giraffe</span><span class="punct">&quot;</span>
313
- <span class="linenum">33</span> <span class="ident">actual</span> <span class="punct">=</span> <span class="constant">Animal</span><span class="punct">.</span><span class="ident">new</span> <span class="punct">&quot;</span><span class="string">bob</span><span class="punct">&quot;,</span> <span class="punct">&quot;</span><span class="string">tortoise</span><span class="punct">&quot;</span>
314
- <span class="offending"><span class="linenum">34</span> <span class="ident">expected</span><span class="punct">.</span><span class="ident">should</span> <span class="ident">eql</span><span class="punct">(</span><span class="ident">actual</span><span class="punct">)</span></span>
315
- <span class="linenum">35</span> <span class="keyword">end</span>
316
- <span class="linenum">36</span><span class="keyword">end</span></code></pre>
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
- begin
3
- require 'nokogiri' # Needed to compare generated with wanted HTML
4
- rescue LoadError
5
- warn "nokogiri not loaded -- skipping HtmlFormatter specs"
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
- ['--diff', '--dry-run'].each do |opt|
15
- it "should produce HTML identical to the one we designed manually with #{opt}" do
16
- root = File.expand_path(File.dirname(__FILE__) + '/../../../..')
17
- suffix = jruby? ? '-jruby' : ''
18
- expected_file = File.dirname(__FILE__) + "/html_formatted-#{::RUBY_VERSION}#{suffix}.html"
19
- raise "There is no HTML file with expected content for this platform: #{expected_file}" unless File.file?(expected_file)
20
- expected_html = File.read(expected_file)
21
-
22
- Dir.chdir(root) do
23
- args = ['examples/failing/mocking_example.rb', 'examples/failing/diffing_spec.rb', 'examples/passing/stubbing_example.rb', 'examples/passing/pending_example.rb', '--format', 'html', opt]
24
- err = StringIO.new
25
- out = StringIO.new
26
- run_with ::Spec::Runner::OptionParser.parse(args, err, out)
27
-
28
- seconds = /\d+\.\d+ seconds/
29
- html = out.string.gsub seconds, 'x seconds'
30
- expected_html.gsub! seconds, 'x seconds'
31
-
32
- if opt == '--diff'
33
- # Uncomment this line temporarily in order to overwrite the expected with actual.
34
- # Use with care!!!
35
- # File.open(expected_file, 'w') {|io| io.write(html)}
36
-
37
- doc = Nokogiri::HTML(html)
38
- backtraces = doc.search("div.backtrace").collect {|e| e.at("pre").inner_html}
39
- doc.css("div.backtrace").remove
40
-
41
- expected_doc = Nokogiri::HTML(expected_html)
42
- expected_backtraces = expected_doc.search("div.backtrace").collect {|e| e.at("pre").inner_html}
43
- expected_doc.search("div.backtrace").remove
44
-
45
- doc.inner_html.should == expected_doc.inner_html
46
-
47
- expected_backtraces.each_with_index do |expected_line, i|
48
- expected_path, expected_line_number, expected_suffix = expected_line.split(':')
49
- actual_path, actual_line_number, actual_suffix = backtraces[i].split(':')
50
- File.expand_path(actual_path).should == File.expand_path(expected_path)
51
- actual_line_number.should == expected_line_number
52
- end
53
- else
54
- html.should =~ /This was a dry-run/m
55
- end
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