rspec 1.1.11 → 1.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. data/.autotest +4 -0
  2. data/History.txt +55 -0
  3. data/Manifest.txt +102 -122
  4. data/README.txt +30 -12
  5. data/Rakefile +10 -10
  6. data/TODO.txt +10 -2
  7. data/{failing_examples → examples/failing}/README.txt +0 -0
  8. data/{failing_examples → examples/failing}/diffing_spec.rb +0 -0
  9. data/{failing_examples → examples/failing}/failing_autogenerated_docstrings_example.rb +0 -0
  10. data/{failing_examples/failure_in_teardown.rb → examples/failing/failure_in_after.rb} +1 -1
  11. data/{failing_examples/failure_in_setup.rb → examples/failing/failure_in_before.rb} +1 -1
  12. data/{failing_examples → examples/failing}/mocking_example.rb +0 -0
  13. data/{failing_examples → examples/failing}/mocking_with_flexmock.rb +0 -0
  14. data/{failing_examples → examples/failing}/mocking_with_mocha.rb +0 -0
  15. data/{failing_examples → examples/failing}/mocking_with_rr.rb +0 -0
  16. data/{failing_examples → examples/failing}/partial_mock_example.rb +0 -0
  17. data/{failing_examples → examples/failing}/predicate_example.rb +5 -0
  18. data/{failing_examples → examples/failing}/raising_example.rb +0 -0
  19. data/{failing_examples → examples/failing}/spec_helper.rb +1 -1
  20. data/{failing_examples → examples/failing}/syntax_error_example.rb +0 -0
  21. data/{failing_examples → examples/failing}/team_spec.rb +0 -0
  22. data/{failing_examples → examples/failing}/timeout_behaviour.rb +0 -0
  23. data/examples/{pure → passing}/autogenerated_docstrings_example.rb +6 -0
  24. data/examples/{pure → passing}/before_and_after_example.rb +0 -0
  25. data/examples/{pure → passing}/behave_as_example.rb +0 -0
  26. data/examples/{pure → passing}/custom_expectation_matchers.rb +0 -0
  27. data/examples/{pure → passing}/custom_formatter.rb +1 -1
  28. data/examples/{pure → passing}/dynamic_spec.rb +2 -2
  29. data/examples/{pure → passing}/file_accessor.rb +0 -0
  30. data/examples/{pure → passing}/file_accessor_spec.rb +0 -0
  31. data/examples/{pure → passing}/greeter_spec.rb +0 -0
  32. data/examples/{pure → passing}/helper_method_example.rb +0 -0
  33. data/examples/{pure → passing}/io_processor.rb +0 -0
  34. data/examples/{pure → passing}/io_processor_spec.rb +0 -0
  35. data/examples/{pure → passing}/legacy_spec.rb +0 -0
  36. data/examples/{pure → passing}/mocking_example.rb +0 -0
  37. data/examples/{pure/multi_threaded_behaviour_runner.rb → passing/multi_threaded_example_group_runner.rb} +1 -3
  38. data/examples/{pure → passing}/nested_classes_example.rb +0 -0
  39. data/examples/{pure → passing}/partial_mock_example.rb +0 -0
  40. data/examples/{pure → passing}/pending_example.rb +0 -0
  41. data/examples/{pure → passing}/predicate_example.rb +0 -0
  42. data/examples/{pure → passing}/priority.txt +0 -0
  43. data/examples/{pure → passing}/shared_example_group_example.rb +0 -0
  44. data/examples/{pure → passing}/shared_stack_examples.rb +1 -3
  45. data/examples/passing/simple_matcher_example.rb +31 -0
  46. data/examples/{pure → passing}/spec_helper.rb +0 -0
  47. data/examples/{pure → passing}/stack.rb +0 -0
  48. data/examples/{pure → passing}/stack_spec.rb +3 -2
  49. data/examples/{pure → passing}/stack_spec_with_nested_example_groups.rb +0 -0
  50. data/examples/{pure → passing}/stubbing_example.rb +0 -0
  51. data/examples/{pure → passing}/yielding_example.rb +0 -0
  52. data/examples/ruby1.9.compatibility/access_to_constants_spec.rb +86 -0
  53. data/features/before_and_after_blocks/before_and_after_blocks.feature +168 -0
  54. data/{stories/example_groups/autogenerated_docstrings → features/example_groups/autogenerated_docstrings.feature} +5 -5
  55. data/{stories/example_groups/example_group_with_should_methods → features/example_groups/example_group_with_should_methods.feature} +3 -3
  56. data/{stories/example_groups/nested_groups → features/example_groups/nested_groups.feature} +4 -4
  57. data/{stories/example_groups/output → features/example_groups/output.feature} +3 -8
  58. data/{stories/interop/examples_and_tests_together → features/interop/examples_and_tests_together.feature} +5 -4
  59. data/features/interop/test_but_not_test_unit.feature +14 -0
  60. data/{stories/interop/test_case_with_should_methods → features/interop/test_case_with_should_methods.feature} +2 -2
  61. data/{stories/mock_framework_integration/use_flexmock.story → features/mock_framework_integration/use_flexmock.feature} +1 -1
  62. data/features/step_definitions/running_rspec.rb +54 -0
  63. data/features/support/env.rb +26 -0
  64. data/{stories/resources → features/support}/helpers/cmdline.rb +0 -0
  65. data/{stories/resources → features/support}/helpers/story_helper.rb +1 -1
  66. data/{stories/resources → features/support}/matchers/smart_match.rb +0 -0
  67. data/{plugins → lib/adapters}/mock_frameworks/flexmock.rb +1 -1
  68. data/{plugins → lib/adapters}/mock_frameworks/mocha.rb +1 -1
  69. data/{plugins → lib/adapters}/mock_frameworks/rr.rb +1 -1
  70. data/{plugins → lib/adapters}/mock_frameworks/rspec.rb +2 -2
  71. data/lib/autotest/rspec.rb +4 -3
  72. data/lib/spec.rb +2 -27
  73. data/lib/spec/dsl.rb +1 -0
  74. data/lib/spec/{extensions → dsl}/main.rb +10 -10
  75. data/lib/spec/example.rb +175 -1
  76. data/lib/spec/example/before_and_after_hooks.rb +30 -24
  77. data/lib/spec/example/example_group.rb +1 -0
  78. data/lib/spec/example/example_group_factory.rb +26 -9
  79. data/lib/spec/example/example_group_methods.rb +138 -113
  80. data/lib/spec/example/example_methods.rb +88 -25
  81. data/lib/spec/example/shared_example_group.rb +28 -21
  82. data/lib/spec/expectations.rb +22 -18
  83. data/lib/spec/expectations/handler.rb +16 -36
  84. data/lib/spec/interop/test/unit/testcase.rb +19 -17
  85. data/lib/spec/interop/test/unit/testresult.rb +1 -1
  86. data/lib/spec/interop/test/unit/testsuite_adapter.rb +1 -1
  87. data/lib/spec/matchers.rb +7 -28
  88. data/lib/spec/matchers/be.rb +103 -116
  89. data/lib/spec/matchers/be_close.rb +6 -22
  90. data/lib/spec/matchers/eql.rb +7 -25
  91. data/lib/spec/matchers/equal.rb +7 -25
  92. data/lib/spec/matchers/errors.rb +5 -0
  93. data/lib/spec/matchers/exist.rb +8 -14
  94. data/lib/spec/matchers/generated_descriptions.rb +48 -0
  95. data/lib/spec/matchers/has.rb +12 -28
  96. data/lib/spec/matchers/include.rb +12 -9
  97. data/lib/spec/matchers/match.rb +8 -27
  98. data/lib/spec/matchers/match_array.rb +79 -0
  99. data/lib/spec/matchers/method_missing.rb +9 -0
  100. data/lib/spec/matchers/operator_matcher.rb +39 -48
  101. data/lib/spec/matchers/raise_error.rb +4 -8
  102. data/lib/spec/matchers/respond_to.rb +33 -8
  103. data/lib/spec/matchers/throw_symbol.rb +49 -17
  104. data/lib/spec/matchers/wrap_expectation.rb +55 -0
  105. data/lib/spec/mocks/argument_constraints.rb +77 -5
  106. data/lib/spec/mocks/message_expectation.rb +7 -7
  107. data/lib/spec/mocks/proxy.rb +14 -12
  108. data/lib/spec/rake/spectask.rb +4 -6
  109. data/lib/spec/ruby.rb +9 -0
  110. data/lib/spec/runner.rb +37 -162
  111. data/lib/spec/runner/backtrace_tweaker.rb +5 -3
  112. data/lib/spec/runner/class_and_arguments_parser.rb +7 -9
  113. data/lib/spec/runner/command_line.rb +6 -8
  114. data/lib/spec/{example → runner}/configuration.rb +46 -47
  115. data/lib/spec/runner/example_group_runner.rb +15 -4
  116. data/lib/spec/runner/formatter/base_text_formatter.rb +4 -3
  117. data/lib/spec/runner/formatter/html_formatter.rb +14 -11
  118. data/lib/spec/runner/formatter/nested_text_formatter.rb +2 -2
  119. data/lib/spec/runner/heckle_runner.rb +58 -56
  120. data/lib/spec/runner/option_parser.rb +8 -4
  121. data/lib/spec/runner/options.rb +29 -14
  122. data/lib/spec/runner/reporter.rb +1 -1
  123. data/lib/spec/runner/spec_parser.rb +11 -9
  124. data/lib/spec/story/runner.rb +40 -42
  125. data/lib/spec/story/runner/story_runner.rb +10 -6
  126. data/lib/spec/story/world.rb +66 -70
  127. data/lib/spec/version.rb +4 -2
  128. data/{rake_tasks → resources/rake}/examples.rake +0 -0
  129. data/{rake_tasks → resources/rake}/examples_with_rcov.rake +0 -0
  130. data/{rake_tasks → resources/rake}/failing_examples_with_html.rake +0 -0
  131. data/{rake_tasks → resources/rake}/verify_rcov.rake +0 -0
  132. data/{stories/resources → resources}/spec/example_group_with_should_methods.rb +1 -1
  133. data/{stories/resources → resources}/spec/simple_spec.rb +1 -1
  134. data/resources/spec/spec_with_flexmock.rb +19 -0
  135. data/{stories/resources → resources}/test/spec_and_test_together.rb +1 -1
  136. data/resources/test/spec_including_test_but_not_unit.rb +11 -0
  137. data/{stories/resources → resources}/test/test_case_with_should_methods.rb +2 -2
  138. data/rspec.gemspec +16 -6
  139. data/spec/autotest/autotest_helper.rb +2 -2
  140. data/spec/autotest/discover_spec.rb +4 -15
  141. data/spec/autotest/failed_results_re_spec.rb +24 -0
  142. data/spec/autotest/rspec_spec.rb +2 -38
  143. data/spec/spec/dsl/main_spec.rb +88 -0
  144. data/spec/spec/example/example_group_class_definition_spec.rb +6 -2
  145. data/spec/spec/example/example_group_factory_spec.rb +50 -10
  146. data/spec/spec/example/example_group_methods_spec.rb +210 -160
  147. data/spec/spec/example/example_group_spec.rb +44 -52
  148. data/spec/spec/example/example_matcher_spec.rb +6 -23
  149. data/spec/spec/example/example_methods_spec.rb +176 -54
  150. data/spec/spec/example/helper_method_spec.rb +24 -0
  151. data/spec/spec/example/pending_module_spec.rb +2 -8
  152. data/spec/spec/example/shared_example_group_spec.rb +56 -80
  153. data/spec/spec/expectations/extensions/object_spec.rb +0 -50
  154. data/spec/spec/expectations/wrap_expectation_spec.rb +30 -0
  155. data/spec/spec/interop/test/unit/spec_spec.rb +1 -5
  156. data/spec/spec/interop/test/unit/test_unit_spec_helper.rb +4 -0
  157. data/spec/spec/matchers/be_close_spec.rb +12 -10
  158. data/spec/spec/matchers/be_spec.rb +62 -7
  159. data/spec/spec/matchers/description_generation_spec.rb +19 -0
  160. data/spec/spec/matchers/eql_spec.rb +7 -6
  161. data/spec/spec/matchers/equal_spec.rb +7 -6
  162. data/spec/spec/matchers/handler_spec.rb +4 -43
  163. data/spec/spec/matchers/has_spec.rb +1 -1
  164. data/spec/spec/matchers/have_spec.rb +23 -18
  165. data/spec/spec/matchers/include_spec.rb +24 -0
  166. data/spec/spec/matchers/match_array_spec.rb +83 -0
  167. data/spec/spec/matchers/matcher_methods_spec.rb +1 -13
  168. data/spec/spec/matchers/raise_error_spec.rb +18 -0
  169. data/spec/spec/matchers/respond_to_spec.rb +71 -9
  170. data/spec/spec/matchers/throw_symbol_spec.rb +85 -43
  171. data/spec/spec/mocks/bug_report_11545_spec.rb +4 -5
  172. data/spec/spec/mocks/bug_report_496.rb +11 -9
  173. data/spec/spec/mocks/bug_report_600_spec.rb +22 -0
  174. data/spec/spec/mocks/hash_including_matcher_spec.rb +39 -2
  175. data/spec/spec/mocks/hash_not_including_matcher_spec.rb +67 -0
  176. data/spec/spec/mocks/mock_spec.rb +5 -6
  177. data/spec/spec/mocks/nil_expectation_warning_spec.rb +2 -2
  178. data/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +18 -3
  179. data/spec/spec/mocks/stub_spec.rb +6 -0
  180. data/spec/spec/mocks/stubbed_message_expectations_spec.rb +14 -0
  181. data/spec/spec/runner/command_line_spec.rb +4 -4
  182. data/spec/spec/runner/configuration_spec.rb +301 -0
  183. data/spec/spec/runner/drb_command_line_spec.rb +4 -4
  184. data/spec/spec/runner/example_group_runner_spec.rb +33 -0
  185. data/spec/spec/runner/formatter/base_formatter_spec.rb +13 -102
  186. data/spec/spec/runner/formatter/base_text_formatter_spec.rb +23 -0
  187. data/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +5 -5
  188. data/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +3 -3
  189. data/spec/spec/runner/formatter/html_formatted-1.8.4.html +6 -6
  190. data/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +9 -9
  191. data/spec/spec/runner/formatter/html_formatted-1.8.5.html +6 -6
  192. data/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +10 -10
  193. data/spec/spec/runner/formatter/html_formatted-1.8.6.html +39 -30
  194. data/spec/spec/runner/formatter/html_formatted-1.8.7.html +379 -0
  195. data/spec/spec/runner/formatter/html_formatted-1.9.1.html +379 -0
  196. data/spec/spec/runner/formatter/html_formatter_spec.rb +14 -13
  197. data/spec/spec/runner/formatter/nested_text_formatter_spec.rb +5 -5
  198. data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +7 -17
  199. data/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +18 -17
  200. data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +5 -5
  201. data/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +6 -6
  202. data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +33 -30
  203. data/spec/spec/runner/formatter/text_mate_formatted-1.8.7.html +373 -0
  204. data/spec/spec/runner/formatter/text_mate_formatted-1.9.1.html +373 -0
  205. data/spec/spec/runner/heckler_spec.rb +16 -9
  206. data/spec/spec/runner/option_parser_spec.rb +3 -18
  207. data/spec/spec/runner/options_spec.rb +27 -8
  208. data/spec/spec/runner/reporter_spec.rb +5 -5
  209. data/spec/spec/runner/resources/custom_example_group_runner.rb +14 -0
  210. data/spec/spec/runner/resources/utf8_encoded.rb +7 -0
  211. data/spec/spec/runner/spec_parser_spec.rb +85 -79
  212. data/spec/spec/spec_spec.rb +21 -0
  213. data/spec/spec_helper.rb +9 -1
  214. data/story_server/prototype/javascripts/prototype.js +1 -1
  215. metadata +119 -131
  216. data/examples/stories/adder.rb +0 -13
  217. data/examples/stories/addition +0 -34
  218. data/examples/stories/addition.rb +0 -9
  219. data/examples/stories/calculator.rb +0 -65
  220. data/examples/stories/game-of-life/.loadpath +0 -5
  221. data/examples/stories/game-of-life/README.txt +0 -21
  222. data/examples/stories/game-of-life/behaviour/everything.rb +0 -6
  223. data/examples/stories/game-of-life/behaviour/examples/examples.rb +0 -3
  224. data/examples/stories/game-of-life/behaviour/examples/game_behaviour.rb +0 -35
  225. data/examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb +0 -66
  226. data/examples/stories/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story +0 -21
  227. data/examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story +0 -21
  228. data/examples/stories/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story +0 -42
  229. data/examples/stories/game-of-life/behaviour/stories/ICanCreateACell.story +0 -42
  230. data/examples/stories/game-of-life/behaviour/stories/ICanKillACell.story +0 -17
  231. data/examples/stories/game-of-life/behaviour/stories/TheGridWraps.story +0 -53
  232. data/examples/stories/game-of-life/behaviour/stories/create_a_cell.rb +0 -52
  233. data/examples/stories/game-of-life/behaviour/stories/helper.rb +0 -6
  234. data/examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb +0 -26
  235. data/examples/stories/game-of-life/behaviour/stories/steps.rb +0 -5
  236. data/examples/stories/game-of-life/behaviour/stories/stories.rb +0 -3
  237. data/examples/stories/game-of-life/behaviour/stories/stories.txt +0 -22
  238. data/examples/stories/game-of-life/life.rb +0 -3
  239. data/examples/stories/game-of-life/life/game.rb +0 -23
  240. data/examples/stories/game-of-life/life/grid.rb +0 -43
  241. data/examples/stories/helper.rb +0 -9
  242. data/examples/stories/steps/addition_steps.rb +0 -18
  243. data/lib/spec/adapters.rb +0 -1
  244. data/lib/spec/adapters/ruby_engine.rb +0 -26
  245. data/lib/spec/adapters/ruby_engine/mri.rb +0 -8
  246. data/lib/spec/adapters/ruby_engine/rubinius.rb +0 -8
  247. data/lib/spec/extensions.rb +0 -4
  248. data/lib/spec/extensions/class.rb +0 -24
  249. data/lib/spec/extensions/metaclass.rb +0 -7
  250. data/lib/spec/extensions/object.rb +0 -6
  251. data/spec/spec/adapters/ruby_engine_spec.rb +0 -16
  252. data/spec/spec/example/configuration_spec.rb +0 -296
  253. data/spec/spec/example/example_runner_spec.rb +0 -194
  254. data/spec/spec/extensions/main_spec.rb +0 -71
  255. data/stories/all.rb +0 -5
  256. data/stories/configuration/before_blocks.story +0 -21
  257. data/stories/configuration/stories.rb +0 -7
  258. data/stories/example_groups/stories.rb +0 -7
  259. data/stories/helper.rb +0 -6
  260. data/stories/interop/stories.rb +0 -7
  261. data/stories/mock_framework_integration/stories.rb +0 -7
  262. data/stories/pending_stories/README +0 -3
  263. data/stories/resources/spec/before_blocks_example.rb +0 -32
  264. data/stories/resources/spec/spec_with_flexmock.rb +0 -18
  265. data/stories/resources/steps/running_rspec.rb +0 -50
  266. data/stories/resources/stories/failing_story.rb +0 -15
  267. data/stories/stories/multiline_steps.story +0 -23
  268. data/stories/stories/steps/multiline_steps.rb +0 -13
  269. data/stories/stories/stories.rb +0 -6
@@ -3,9 +3,11 @@ module Spec
3
3
  unless defined? MAJOR
4
4
  MAJOR = 1
5
5
  MINOR = 1
6
- TINY = 11
6
+ TINY = 12
7
+ MINESCULE = nil
8
+
7
9
 
8
- STRING = [MAJOR, MINOR, TINY].join('.')
10
+ STRING = [MAJOR, MINOR, TINY, MINESCULE].compact.join('.')
9
11
 
10
12
  SUMMARY = "rspec #{STRING}"
11
13
  end
@@ -1,4 +1,4 @@
1
- $:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
1
+ $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
2
2
  require 'spec'
3
3
 
4
4
  class MySpec < Spec::ExampleGroup
@@ -1,4 +1,4 @@
1
- $:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
1
+ $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
2
2
  require 'spec'
3
3
 
4
4
  describe "Running an Example" do
@@ -0,0 +1,19 @@
1
+ $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
2
+ require "rubygems"
3
+ require 'spec'
4
+
5
+ Spec::Runner.configure do |config|
6
+ config.mock_with :flexmock
7
+ end
8
+
9
+ describe "plugging in flexmock" do
10
+ it "allows flexmock to be used" do
11
+ target = Object.new
12
+ flexmock(target).should_receive(:foo).once
13
+ lambda {flexmock_verify}.should raise_error
14
+ end
15
+
16
+ it "does not include rspec mocks" do
17
+ Spec.const_defined?(:Mocks).should be_false
18
+ end
19
+ end
@@ -1,4 +1,4 @@
1
- $:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
1
+ $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
2
2
  require 'spec'
3
3
  # TODO - this should not be necessary, ay?
4
4
  require 'spec/interop/test'
@@ -0,0 +1,11 @@
1
+ $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
2
+ require 'spec'
3
+
4
+ module Test
5
+ end
6
+
7
+ describe "description" do
8
+ it "should description" do
9
+ 1.should == 1
10
+ end
11
+ end
@@ -1,9 +1,9 @@
1
- $:.push File.join(File.dirname(__FILE__), *%w[.. .. .. lib])
1
+ $:.push File.join(File.dirname(__FILE__), *%w[.. .. lib])
2
2
  require 'test/unit'
3
3
  require 'spec'
4
4
  require 'spec/interop/test'
5
5
 
6
- class MySpec < Test::Unit::TestCase
6
+ class MyTest < Test::Unit::TestCase
7
7
  def should_pass_with_should
8
8
  1.should == 1
9
9
  end
@@ -2,21 +2,31 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rspec}
5
- s.version = "1.1.11"
5
+ s.version = "1.1.12"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["RSpec Development Team"]
9
- s.date = %q{2008-10-24}
9
+ s.date = %q{2009-01-11}
10
10
  s.description = %q{Behaviour Driven Development for Ruby.}
11
11
  s.email = ["rspec-devel@rubyforge.org"]
12
12
  s.executables = ["autospec", "spec"]
13
- s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "TODO.txt", "examples/pure/priority.txt", "examples/stories/game-of-life/README.txt", "examples/stories/game-of-life/behaviour/stories/stories.txt", "failing_examples/README.txt", "spec/spec/runner/empty_file.txt", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt"]
14
- s.files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "bin/autospec", "bin/spec", "examples/pure/autogenerated_docstrings_example.rb", "examples/pure/before_and_after_example.rb", "examples/pure/behave_as_example.rb", "examples/pure/custom_expectation_matchers.rb", "examples/pure/custom_formatter.rb", "examples/pure/dynamic_spec.rb", "examples/pure/file_accessor.rb", "examples/pure/file_accessor_spec.rb", "examples/pure/greeter_spec.rb", "examples/pure/helper_method_example.rb", "examples/pure/io_processor.rb", "examples/pure/io_processor_spec.rb", "examples/pure/legacy_spec.rb", "examples/pure/mocking_example.rb", "examples/pure/multi_threaded_behaviour_runner.rb", "examples/pure/nested_classes_example.rb", "examples/pure/partial_mock_example.rb", "examples/pure/pending_example.rb", "examples/pure/predicate_example.rb", "examples/pure/priority.txt", "examples/pure/shared_example_group_example.rb", "examples/pure/shared_stack_examples.rb", "examples/pure/spec_helper.rb", "examples/pure/stack.rb", "examples/pure/stack_spec.rb", "examples/pure/stack_spec_with_nested_example_groups.rb", "examples/pure/stubbing_example.rb", "examples/pure/yielding_example.rb", "examples/stories/adder.rb", "examples/stories/addition", "examples/stories/addition.rb", "examples/stories/calculator.rb", "examples/stories/game-of-life/.loadpath", "examples/stories/game-of-life/README.txt", "examples/stories/game-of-life/behaviour/everything.rb", "examples/stories/game-of-life/behaviour/examples/examples.rb", "examples/stories/game-of-life/behaviour/examples/game_behaviour.rb", "examples/stories/game-of-life/behaviour/examples/grid_behaviour.rb", "examples/stories/game-of-life/behaviour/stories/CellsWithLessThanTwoNeighboursDie.story", "examples/stories/game-of-life/behaviour/stories/CellsWithMoreThanThreeNeighboursDie.story", "examples/stories/game-of-life/behaviour/stories/EmptySpacesWithThreeNeighboursCreateACell.story", "examples/stories/game-of-life/behaviour/stories/ICanCreateACell.story", "examples/stories/game-of-life/behaviour/stories/ICanKillACell.story", "examples/stories/game-of-life/behaviour/stories/TheGridWraps.story", "examples/stories/game-of-life/behaviour/stories/create_a_cell.rb", "examples/stories/game-of-life/behaviour/stories/helper.rb", "examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb", "examples/stories/game-of-life/behaviour/stories/steps.rb", "examples/stories/game-of-life/behaviour/stories/stories.rb", "examples/stories/game-of-life/behaviour/stories/stories.txt", "examples/stories/game-of-life/life.rb", "examples/stories/game-of-life/life/game.rb", "examples/stories/game-of-life/life/grid.rb", "examples/stories/helper.rb", "examples/stories/steps/addition_steps.rb", "failing_examples/README.txt", "failing_examples/diffing_spec.rb", "failing_examples/failing_autogenerated_docstrings_example.rb", "failing_examples/failure_in_setup.rb", "failing_examples/failure_in_teardown.rb", "failing_examples/mocking_example.rb", "failing_examples/mocking_with_flexmock.rb", "failing_examples/mocking_with_mocha.rb", "failing_examples/mocking_with_rr.rb", "failing_examples/partial_mock_example.rb", "failing_examples/predicate_example.rb", "failing_examples/raising_example.rb", "failing_examples/spec_helper.rb", "failing_examples/syntax_error_example.rb", "failing_examples/team_spec.rb", "failing_examples/timeout_behaviour.rb", "init.rb", "lib/autotest/discover.rb", "lib/autotest/rspec.rb", "lib/spec.rb", "lib/spec/adapters.rb", "lib/spec/adapters/ruby_engine.rb", "lib/spec/adapters/ruby_engine/mri.rb", "lib/spec/adapters/ruby_engine/rubinius.rb", "lib/spec/example.rb", "lib/spec/example/before_and_after_hooks.rb", "lib/spec/example/configuration.rb", "lib/spec/example/errors.rb", "lib/spec/example/example_group.rb", "lib/spec/example/example_group_factory.rb", "lib/spec/example/example_group_methods.rb", "lib/spec/example/example_matcher.rb", "lib/spec/example/example_methods.rb", "lib/spec/example/module_reopening_fix.rb", "lib/spec/example/pending.rb", "lib/spec/example/shared_example_group.rb", "lib/spec/expectations.rb", "lib/spec/expectations/differs/default.rb", "lib/spec/expectations/errors.rb", "lib/spec/expectations/extensions.rb", "lib/spec/expectations/extensions/object.rb", "lib/spec/expectations/extensions/string_and_symbol.rb", "lib/spec/expectations/handler.rb", "lib/spec/extensions.rb", "lib/spec/extensions/class.rb", "lib/spec/extensions/main.rb", "lib/spec/extensions/metaclass.rb", "lib/spec/extensions/object.rb", "lib/spec/interop/test.rb", "lib/spec/interop/test/unit/autorunner.rb", "lib/spec/interop/test/unit/testcase.rb", "lib/spec/interop/test/unit/testresult.rb", "lib/spec/interop/test/unit/testsuite_adapter.rb", "lib/spec/interop/test/unit/ui/console/testrunner.rb", "lib/spec/matchers.rb", "lib/spec/matchers/be.rb", "lib/spec/matchers/be_close.rb", "lib/spec/matchers/change.rb", "lib/spec/matchers/eql.rb", "lib/spec/matchers/equal.rb", "lib/spec/matchers/exist.rb", "lib/spec/matchers/has.rb", "lib/spec/matchers/have.rb", "lib/spec/matchers/include.rb", "lib/spec/matchers/match.rb", "lib/spec/matchers/operator_matcher.rb", "lib/spec/matchers/raise_error.rb", "lib/spec/matchers/respond_to.rb", "lib/spec/matchers/satisfy.rb", "lib/spec/matchers/simple_matcher.rb", "lib/spec/matchers/throw_symbol.rb", "lib/spec/mocks.rb", "lib/spec/mocks/argument_constraints.rb", "lib/spec/mocks/argument_expectation.rb", "lib/spec/mocks/error_generator.rb", "lib/spec/mocks/errors.rb", "lib/spec/mocks/extensions.rb", "lib/spec/mocks/extensions/object.rb", "lib/spec/mocks/framework.rb", "lib/spec/mocks/message_expectation.rb", "lib/spec/mocks/methods.rb", "lib/spec/mocks/mock.rb", "lib/spec/mocks/order_group.rb", "lib/spec/mocks/proxy.rb", "lib/spec/mocks/space.rb", "lib/spec/mocks/spec_methods.rb", "lib/spec/rake/spectask.rb", "lib/spec/rake/verify_rcov.rb", "lib/spec/runner.rb", "lib/spec/runner/backtrace_tweaker.rb", "lib/spec/runner/class_and_arguments_parser.rb", "lib/spec/runner/command_line.rb", "lib/spec/runner/drb_command_line.rb", "lib/spec/runner/example_group_runner.rb", "lib/spec/runner/formatter/base_formatter.rb", "lib/spec/runner/formatter/base_text_formatter.rb", "lib/spec/runner/formatter/failing_example_groups_formatter.rb", "lib/spec/runner/formatter/failing_examples_formatter.rb", "lib/spec/runner/formatter/html_formatter.rb", "lib/spec/runner/formatter/nested_text_formatter.rb", "lib/spec/runner/formatter/profile_formatter.rb", "lib/spec/runner/formatter/progress_bar_formatter.rb", "lib/spec/runner/formatter/snippet_extractor.rb", "lib/spec/runner/formatter/specdoc_formatter.rb", "lib/spec/runner/formatter/story/html_formatter.rb", "lib/spec/runner/formatter/story/plain_text_formatter.rb", "lib/spec/runner/formatter/story/progress_bar_formatter.rb", "lib/spec/runner/formatter/text_mate_formatter.rb", "lib/spec/runner/heckle_runner.rb", "lib/spec/runner/heckle_runner_unsupported.rb", "lib/spec/runner/option_parser.rb", "lib/spec/runner/options.rb", "lib/spec/runner/reporter.rb", "lib/spec/runner/spec_parser.rb", "lib/spec/story.rb", "lib/spec/story/extensions.rb", "lib/spec/story/extensions/main.rb", "lib/spec/story/extensions/regexp.rb", "lib/spec/story/extensions/string.rb", "lib/spec/story/given_scenario.rb", "lib/spec/story/runner.rb", "lib/spec/story/runner/plain_text_story_runner.rb", "lib/spec/story/runner/scenario_collector.rb", "lib/spec/story/runner/scenario_runner.rb", "lib/spec/story/runner/story_mediator.rb", "lib/spec/story/runner/story_parser.rb", "lib/spec/story/runner/story_runner.rb", "lib/spec/story/scenario.rb", "lib/spec/story/step.rb", "lib/spec/story/step_group.rb", "lib/spec/story/step_mother.rb", "lib/spec/story/story.rb", "lib/spec/story/world.rb", "lib/spec/version.rb", "plugins/mock_frameworks/flexmock.rb", "plugins/mock_frameworks/mocha.rb", "plugins/mock_frameworks/rr.rb", "plugins/mock_frameworks/rspec.rb", "rake_tasks/examples.rake", "rake_tasks/examples_with_rcov.rake", "rake_tasks/failing_examples_with_html.rake", "rake_tasks/verify_rcov.rake", "rspec.gemspec", "spec/README.jruby", "spec/autotest/autotest_helper.rb", "spec/autotest/autotest_matchers.rb", "spec/autotest/discover_spec.rb", "spec/autotest/rspec_spec.rb", "spec/rspec_suite.rb", "spec/ruby_forker.rb", "spec/spec.opts", "spec/spec/adapters/ruby_engine_spec.rb", "spec/spec/example/configuration_spec.rb", "spec/spec/example/example_group_class_definition_spec.rb", "spec/spec/example/example_group_factory_spec.rb", "spec/spec/example/example_group_methods_spec.rb", "spec/spec/example/example_group_spec.rb", "spec/spec/example/example_matcher_spec.rb", "spec/spec/example/example_methods_spec.rb", "spec/spec/example/example_runner_spec.rb", "spec/spec/example/nested_example_group_spec.rb", "spec/spec/example/pending_module_spec.rb", "spec/spec/example/predicate_matcher_spec.rb", "spec/spec/example/shared_example_group_spec.rb", "spec/spec/example/subclassing_example_group_spec.rb", "spec/spec/expectations/differs/default_spec.rb", "spec/spec/expectations/extensions/object_spec.rb", "spec/spec/expectations/fail_with_spec.rb", "spec/spec/extensions/main_spec.rb", "spec/spec/interop/test/unit/resources/spec_that_fails.rb", "spec/spec/interop/test/unit/resources/spec_that_passes.rb", "spec/spec/interop/test/unit/resources/spec_with_errors.rb", "spec/spec/interop/test/unit/resources/spec_with_options_hash.rb", "spec/spec/interop/test/unit/resources/test_case_that_fails.rb", "spec/spec/interop/test/unit/resources/test_case_that_passes.rb", "spec/spec/interop/test/unit/resources/test_case_with_errors.rb", "spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb", "spec/spec/interop/test/unit/spec_spec.rb", "spec/spec/interop/test/unit/test_unit_spec_helper.rb", "spec/spec/interop/test/unit/testcase_spec.rb", "spec/spec/interop/test/unit/testsuite_adapter_spec.rb", "spec/spec/matchers/be_close_spec.rb", "spec/spec/matchers/be_spec.rb", "spec/spec/matchers/change_spec.rb", "spec/spec/matchers/description_generation_spec.rb", "spec/spec/matchers/eql_spec.rb", "spec/spec/matchers/equal_spec.rb", "spec/spec/matchers/exist_spec.rb", "spec/spec/matchers/handler_spec.rb", "spec/spec/matchers/has_spec.rb", "spec/spec/matchers/have_spec.rb", "spec/spec/matchers/include_spec.rb", "spec/spec/matchers/match_spec.rb", "spec/spec/matchers/matcher_methods_spec.rb", "spec/spec/matchers/mock_constraint_matchers_spec.rb", "spec/spec/matchers/operator_matcher_spec.rb", "spec/spec/matchers/raise_error_spec.rb", "spec/spec/matchers/respond_to_spec.rb", "spec/spec/matchers/satisfy_spec.rb", "spec/spec/matchers/simple_matcher_spec.rb", "spec/spec/matchers/throw_symbol_spec.rb", "spec/spec/mocks/any_number_of_times_spec.rb", "spec/spec/mocks/argument_expectation_spec.rb", "spec/spec/mocks/at_least_spec.rb", "spec/spec/mocks/at_most_spec.rb", "spec/spec/mocks/bug_report_10260_spec.rb", "spec/spec/mocks/bug_report_10263_spec.rb", "spec/spec/mocks/bug_report_11545_spec.rb", "spec/spec/mocks/bug_report_15719_spec.rb", "spec/spec/mocks/bug_report_496.rb", "spec/spec/mocks/bug_report_7611_spec.rb", "spec/spec/mocks/bug_report_7805_spec.rb", "spec/spec/mocks/bug_report_8165_spec.rb", "spec/spec/mocks/bug_report_8302_spec.rb", "spec/spec/mocks/failing_mock_argument_constraints_spec.rb", "spec/spec/mocks/hash_including_matcher_spec.rb", "spec/spec/mocks/mock_ordering_spec.rb", "spec/spec/mocks/mock_space_spec.rb", "spec/spec/mocks/mock_spec.rb", "spec/spec/mocks/multiple_return_value_spec.rb", "spec/spec/mocks/nil_expectation_warning_spec.rb", "spec/spec/mocks/null_object_mock_spec.rb", "spec/spec/mocks/once_counts_spec.rb", "spec/spec/mocks/options_hash_spec.rb", "spec/spec/mocks/partial_mock_spec.rb", "spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb", "spec/spec/mocks/passing_mock_argument_constraints_spec.rb", "spec/spec/mocks/precise_counts_spec.rb", "spec/spec/mocks/record_messages_spec.rb", "spec/spec/mocks/stub_spec.rb", "spec/spec/mocks/twice_counts_spec.rb", "spec/spec/package/bin_spec_spec.rb", "spec/spec/runner/class_and_argument_parser_spec.rb", "spec/spec/runner/command_line_spec.rb", "spec/spec/runner/drb_command_line_spec.rb", "spec/spec/runner/empty_file.txt", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt", "spec/spec/runner/formatter/base_formatter_spec.rb", "spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb", "spec/spec/runner/formatter/failing_examples_formatter_spec.rb", "spec/spec/runner/formatter/html_formatted-1.8.4.html", "spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.5.html", "spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.6.html", "spec/spec/runner/formatter/html_formatter_spec.rb", "spec/spec/runner/formatter/nested_text_formatter_spec.rb", "spec/spec/runner/formatter/profile_formatter_spec.rb", "spec/spec/runner/formatter/progress_bar_formatter_spec.rb", "spec/spec/runner/formatter/snippet_extractor_spec.rb", "spec/spec/runner/formatter/spec_mate_formatter_spec.rb", "spec/spec/runner/formatter/specdoc_formatter_spec.rb", "spec/spec/runner/formatter/story/html_formatter_spec.rb", "spec/spec/runner/formatter/story/plain_text_formatter_spec.rb", "spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb", "spec/spec/runner/formatter/text_mate_formatted-1.8.4.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.6.html", "spec/spec/runner/heckle_runner_spec.rb", "spec/spec/runner/heckler_spec.rb", "spec/spec/runner/noisy_backtrace_tweaker_spec.rb", "spec/spec/runner/option_parser_spec.rb", "spec/spec/runner/options_spec.rb", "spec/spec/runner/output_one_time_fixture.rb", "spec/spec/runner/output_one_time_fixture_runner.rb", "spec/spec/runner/output_one_time_spec.rb", "spec/spec/runner/quiet_backtrace_tweaker_spec.rb", "spec/spec/runner/reporter_spec.rb", "spec/spec/runner/resources/a_bar.rb", "spec/spec/runner/resources/a_foo.rb", "spec/spec/runner/resources/a_spec.rb", "spec/spec/runner/spec.opts", "spec/spec/runner/spec_drb.opts", "spec/spec/runner/spec_parser/spec_parser_fixture.rb", "spec/spec/runner/spec_parser_spec.rb", "spec/spec/runner/spec_spaced.opts", "spec/spec/runner_spec.rb", "spec/spec/spec_classes.rb", "spec/spec/story/builders.rb", "spec/spec/story/extensions/main_spec.rb", "spec/spec/story/extensions_spec.rb", "spec/spec/story/given_scenario_spec.rb", "spec/spec/story/runner/plain_text_story_runner_spec.rb", "spec/spec/story/runner/scenario_collector_spec.rb", "spec/spec/story/runner/scenario_runner_spec.rb", "spec/spec/story/runner/story_mediator_spec.rb", "spec/spec/story/runner/story_parser_spec.rb", "spec/spec/story/runner/story_runner_spec.rb", "spec/spec/story/runner_spec.rb", "spec/spec/story/scenario_spec.rb", "spec/spec/story/step_group_spec.rb", "spec/spec/story/step_mother_spec.rb", "spec/spec/story/step_spec.rb", "spec/spec/story/story_helper.rb", "spec/spec/story/story_spec.rb", "spec/spec/story/world_spec.rb", "spec/spec_helper.rb", "stories/all.rb", "stories/configuration/before_blocks.story", "stories/configuration/stories.rb", "stories/example_groups/autogenerated_docstrings", "stories/example_groups/example_group_with_should_methods", "stories/example_groups/nested_groups", "stories/example_groups/output", "stories/example_groups/stories.rb", "stories/helper.rb", "stories/interop/examples_and_tests_together", "stories/interop/stories.rb", "stories/interop/test_case_with_should_methods", "stories/mock_framework_integration/stories.rb", "stories/mock_framework_integration/use_flexmock.story", "stories/pending_stories/README", "stories/resources/helpers/cmdline.rb", "stories/resources/helpers/story_helper.rb", "stories/resources/matchers/smart_match.rb", "stories/resources/spec/before_blocks_example.rb", "stories/resources/spec/example_group_with_should_methods.rb", "stories/resources/spec/simple_spec.rb", "stories/resources/spec/spec_with_flexmock.rb", "stories/resources/steps/running_rspec.rb", "stories/resources/stories/failing_story.rb", "stories/resources/test/spec_and_test_together.rb", "stories/resources/test/test_case_with_should_methods.rb", "stories/stories/multiline_steps.story", "stories/stories/steps/multiline_steps.rb", "stories/stories/stories.rb", "story_server/prototype/javascripts/builder.js", "story_server/prototype/javascripts/controls.js", "story_server/prototype/javascripts/dragdrop.js", "story_server/prototype/javascripts/effects.js", "story_server/prototype/javascripts/prototype.js", "story_server/prototype/javascripts/rspec.js", "story_server/prototype/javascripts/scriptaculous.js", "story_server/prototype/javascripts/slider.js", "story_server/prototype/javascripts/sound.js", "story_server/prototype/javascripts/unittest.js", "story_server/prototype/lib/server.rb", "story_server/prototype/stories.html", "story_server/prototype/stylesheets/rspec.css", "story_server/prototype/stylesheets/test.css"]
13
+ s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "TODO.txt", "examples/failing/README.txt", "examples/passing/priority.txt", "spec/spec/runner/empty_file.txt", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt"]
14
+ s.files = [".autotest", "History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "TODO.txt", "bin/autospec", "bin/spec", "examples/failing/README.txt", "examples/failing/diffing_spec.rb", "examples/failing/failing_autogenerated_docstrings_example.rb", "examples/failing/failure_in_after.rb", "examples/failing/failure_in_before.rb", "examples/failing/mocking_example.rb", "examples/failing/mocking_with_flexmock.rb", "examples/failing/mocking_with_mocha.rb", "examples/failing/mocking_with_rr.rb", "examples/failing/partial_mock_example.rb", "examples/failing/predicate_example.rb", "examples/failing/raising_example.rb", "examples/failing/spec_helper.rb", "examples/failing/syntax_error_example.rb", "examples/failing/team_spec.rb", "examples/failing/timeout_behaviour.rb", "examples/passing/autogenerated_docstrings_example.rb", "examples/passing/before_and_after_example.rb", "examples/passing/behave_as_example.rb", "examples/passing/custom_expectation_matchers.rb", "examples/passing/custom_formatter.rb", "examples/passing/dynamic_spec.rb", "examples/passing/file_accessor.rb", "examples/passing/file_accessor_spec.rb", "examples/passing/greeter_spec.rb", "examples/passing/helper_method_example.rb", "examples/passing/io_processor.rb", "examples/passing/io_processor_spec.rb", "examples/passing/legacy_spec.rb", "examples/passing/mocking_example.rb", "examples/passing/multi_threaded_example_group_runner.rb", "examples/passing/nested_classes_example.rb", "examples/passing/partial_mock_example.rb", "examples/passing/pending_example.rb", "examples/passing/predicate_example.rb", "examples/passing/priority.txt", "examples/passing/shared_example_group_example.rb", "examples/passing/shared_stack_examples.rb", "examples/passing/simple_matcher_example.rb", "examples/passing/spec_helper.rb", "examples/passing/stack.rb", "examples/passing/stack_spec.rb", "examples/passing/stack_spec_with_nested_example_groups.rb", "examples/passing/stubbing_example.rb", "examples/passing/yielding_example.rb", "examples/ruby1.9.compatibility/access_to_constants_spec.rb", "features/before_and_after_blocks/before_and_after_blocks.feature", "features/example_groups/autogenerated_docstrings.feature", "features/example_groups/example_group_with_should_methods.feature", "features/example_groups/nested_groups.feature", "features/example_groups/output.feature", "features/interop/examples_and_tests_together.feature", "features/interop/test_but_not_test_unit.feature", "features/interop/test_case_with_should_methods.feature", "features/mock_framework_integration/use_flexmock.feature", "features/step_definitions/running_rspec.rb", "features/support/env.rb", "features/support/helpers/cmdline.rb", "features/support/helpers/story_helper.rb", "features/support/matchers/smart_match.rb", "init.rb", "lib/adapters/mock_frameworks/flexmock.rb", "lib/adapters/mock_frameworks/mocha.rb", "lib/adapters/mock_frameworks/rr.rb", "lib/adapters/mock_frameworks/rspec.rb", "lib/autotest/discover.rb", "lib/autotest/rspec.rb", "lib/spec.rb", "lib/spec/dsl.rb", "lib/spec/dsl/main.rb", "lib/spec/example.rb", "lib/spec/example/before_and_after_hooks.rb", "lib/spec/example/errors.rb", "lib/spec/example/example_group.rb", "lib/spec/example/example_group_factory.rb", "lib/spec/example/example_group_methods.rb", "lib/spec/example/example_matcher.rb", "lib/spec/example/example_methods.rb", "lib/spec/example/module_reopening_fix.rb", "lib/spec/example/pending.rb", "lib/spec/example/shared_example_group.rb", "lib/spec/expectations.rb", "lib/spec/expectations/differs/default.rb", "lib/spec/expectations/errors.rb", "lib/spec/expectations/extensions.rb", "lib/spec/expectations/extensions/object.rb", "lib/spec/expectations/extensions/string_and_symbol.rb", "lib/spec/expectations/handler.rb", "lib/spec/interop/test.rb", "lib/spec/interop/test/unit/autorunner.rb", "lib/spec/interop/test/unit/testcase.rb", "lib/spec/interop/test/unit/testresult.rb", "lib/spec/interop/test/unit/testsuite_adapter.rb", "lib/spec/interop/test/unit/ui/console/testrunner.rb", "lib/spec/matchers.rb", "lib/spec/matchers/be.rb", "lib/spec/matchers/be_close.rb", "lib/spec/matchers/change.rb", "lib/spec/matchers/eql.rb", "lib/spec/matchers/equal.rb", "lib/spec/matchers/errors.rb", "lib/spec/matchers/exist.rb", "lib/spec/matchers/generated_descriptions.rb", "lib/spec/matchers/has.rb", "lib/spec/matchers/have.rb", "lib/spec/matchers/include.rb", "lib/spec/matchers/match.rb", "lib/spec/matchers/match_array.rb", "lib/spec/matchers/method_missing.rb", "lib/spec/matchers/operator_matcher.rb", "lib/spec/matchers/raise_error.rb", "lib/spec/matchers/respond_to.rb", "lib/spec/matchers/satisfy.rb", "lib/spec/matchers/simple_matcher.rb", "lib/spec/matchers/throw_symbol.rb", "lib/spec/matchers/wrap_expectation.rb", "lib/spec/mocks.rb", "lib/spec/mocks/argument_constraints.rb", "lib/spec/mocks/argument_expectation.rb", "lib/spec/mocks/error_generator.rb", "lib/spec/mocks/errors.rb", "lib/spec/mocks/extensions.rb", "lib/spec/mocks/extensions/object.rb", "lib/spec/mocks/framework.rb", "lib/spec/mocks/message_expectation.rb", "lib/spec/mocks/methods.rb", "lib/spec/mocks/mock.rb", "lib/spec/mocks/order_group.rb", "lib/spec/mocks/proxy.rb", "lib/spec/mocks/space.rb", "lib/spec/mocks/spec_methods.rb", "lib/spec/rake/spectask.rb", "lib/spec/rake/verify_rcov.rb", "lib/spec/ruby.rb", "lib/spec/runner.rb", "lib/spec/runner/backtrace_tweaker.rb", "lib/spec/runner/class_and_arguments_parser.rb", "lib/spec/runner/command_line.rb", "lib/spec/runner/configuration.rb", "lib/spec/runner/drb_command_line.rb", "lib/spec/runner/example_group_runner.rb", "lib/spec/runner/formatter/base_formatter.rb", "lib/spec/runner/formatter/base_text_formatter.rb", "lib/spec/runner/formatter/failing_example_groups_formatter.rb", "lib/spec/runner/formatter/failing_examples_formatter.rb", "lib/spec/runner/formatter/html_formatter.rb", "lib/spec/runner/formatter/nested_text_formatter.rb", "lib/spec/runner/formatter/profile_formatter.rb", "lib/spec/runner/formatter/progress_bar_formatter.rb", "lib/spec/runner/formatter/snippet_extractor.rb", "lib/spec/runner/formatter/specdoc_formatter.rb", "lib/spec/runner/formatter/story/html_formatter.rb", "lib/spec/runner/formatter/story/plain_text_formatter.rb", "lib/spec/runner/formatter/story/progress_bar_formatter.rb", "lib/spec/runner/formatter/text_mate_formatter.rb", "lib/spec/runner/heckle_runner.rb", "lib/spec/runner/heckle_runner_unsupported.rb", "lib/spec/runner/option_parser.rb", "lib/spec/runner/options.rb", "lib/spec/runner/reporter.rb", "lib/spec/runner/spec_parser.rb", "lib/spec/story.rb", "lib/spec/story/extensions.rb", "lib/spec/story/extensions/main.rb", "lib/spec/story/extensions/regexp.rb", "lib/spec/story/extensions/string.rb", "lib/spec/story/given_scenario.rb", "lib/spec/story/runner.rb", "lib/spec/story/runner/plain_text_story_runner.rb", "lib/spec/story/runner/scenario_collector.rb", "lib/spec/story/runner/scenario_runner.rb", "lib/spec/story/runner/story_mediator.rb", "lib/spec/story/runner/story_parser.rb", "lib/spec/story/runner/story_runner.rb", "lib/spec/story/scenario.rb", "lib/spec/story/step.rb", "lib/spec/story/step_group.rb", "lib/spec/story/step_mother.rb", "lib/spec/story/story.rb", "lib/spec/story/world.rb", "lib/spec/version.rb", "resources/rake/examples.rake", "resources/rake/examples_with_rcov.rake", "resources/rake/failing_examples_with_html.rake", "resources/rake/verify_rcov.rake", "resources/spec/example_group_with_should_methods.rb", "resources/spec/simple_spec.rb", "resources/spec/spec_with_flexmock.rb", "resources/test/spec_and_test_together.rb", "resources/test/spec_including_test_but_not_unit.rb", "resources/test/test_case_with_should_methods.rb", "rspec.gemspec", "spec/README.jruby", "spec/autotest/autotest_helper.rb", "spec/autotest/autotest_matchers.rb", "spec/autotest/discover_spec.rb", "spec/autotest/failed_results_re_spec.rb", "spec/autotest/rspec_spec.rb", "spec/rspec_suite.rb", "spec/ruby_forker.rb", "spec/spec.opts", "spec/spec/dsl/main_spec.rb", "spec/spec/example/example_group_class_definition_spec.rb", "spec/spec/example/example_group_factory_spec.rb", "spec/spec/example/example_group_methods_spec.rb", "spec/spec/example/example_group_spec.rb", "spec/spec/example/example_matcher_spec.rb", "spec/spec/example/example_methods_spec.rb", "spec/spec/example/helper_method_spec.rb", "spec/spec/example/nested_example_group_spec.rb", "spec/spec/example/pending_module_spec.rb", "spec/spec/example/predicate_matcher_spec.rb", "spec/spec/example/shared_example_group_spec.rb", "spec/spec/example/subclassing_example_group_spec.rb", "spec/spec/expectations/differs/default_spec.rb", "spec/spec/expectations/extensions/object_spec.rb", "spec/spec/expectations/fail_with_spec.rb", "spec/spec/expectations/wrap_expectation_spec.rb", "spec/spec/interop/test/unit/resources/spec_that_fails.rb", "spec/spec/interop/test/unit/resources/spec_that_passes.rb", "spec/spec/interop/test/unit/resources/spec_with_errors.rb", "spec/spec/interop/test/unit/resources/spec_with_options_hash.rb", "spec/spec/interop/test/unit/resources/test_case_that_fails.rb", "spec/spec/interop/test/unit/resources/test_case_that_passes.rb", "spec/spec/interop/test/unit/resources/test_case_with_errors.rb", "spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb", "spec/spec/interop/test/unit/spec_spec.rb", "spec/spec/interop/test/unit/test_unit_spec_helper.rb", "spec/spec/interop/test/unit/testcase_spec.rb", "spec/spec/interop/test/unit/testsuite_adapter_spec.rb", "spec/spec/matchers/be_close_spec.rb", "spec/spec/matchers/be_spec.rb", "spec/spec/matchers/change_spec.rb", "spec/spec/matchers/description_generation_spec.rb", "spec/spec/matchers/eql_spec.rb", "spec/spec/matchers/equal_spec.rb", "spec/spec/matchers/exist_spec.rb", "spec/spec/matchers/handler_spec.rb", "spec/spec/matchers/has_spec.rb", "spec/spec/matchers/have_spec.rb", "spec/spec/matchers/include_spec.rb", "spec/spec/matchers/match_array_spec.rb", "spec/spec/matchers/match_spec.rb", "spec/spec/matchers/matcher_methods_spec.rb", "spec/spec/matchers/mock_constraint_matchers_spec.rb", "spec/spec/matchers/operator_matcher_spec.rb", "spec/spec/matchers/raise_error_spec.rb", "spec/spec/matchers/respond_to_spec.rb", "spec/spec/matchers/satisfy_spec.rb", "spec/spec/matchers/simple_matcher_spec.rb", "spec/spec/matchers/throw_symbol_spec.rb", "spec/spec/mocks/any_number_of_times_spec.rb", "spec/spec/mocks/argument_expectation_spec.rb", "spec/spec/mocks/at_least_spec.rb", "spec/spec/mocks/at_most_spec.rb", "spec/spec/mocks/bug_report_10260_spec.rb", "spec/spec/mocks/bug_report_10263_spec.rb", "spec/spec/mocks/bug_report_11545_spec.rb", "spec/spec/mocks/bug_report_15719_spec.rb", "spec/spec/mocks/bug_report_496.rb", "spec/spec/mocks/bug_report_600_spec.rb", "spec/spec/mocks/bug_report_7611_spec.rb", "spec/spec/mocks/bug_report_7805_spec.rb", "spec/spec/mocks/bug_report_8165_spec.rb", "spec/spec/mocks/bug_report_8302_spec.rb", "spec/spec/mocks/failing_mock_argument_constraints_spec.rb", "spec/spec/mocks/hash_including_matcher_spec.rb", "spec/spec/mocks/hash_not_including_matcher_spec.rb", "spec/spec/mocks/mock_ordering_spec.rb", "spec/spec/mocks/mock_space_spec.rb", "spec/spec/mocks/mock_spec.rb", "spec/spec/mocks/multiple_return_value_spec.rb", "spec/spec/mocks/nil_expectation_warning_spec.rb", "spec/spec/mocks/null_object_mock_spec.rb", "spec/spec/mocks/once_counts_spec.rb", "spec/spec/mocks/options_hash_spec.rb", "spec/spec/mocks/partial_mock_spec.rb", "spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb", "spec/spec/mocks/passing_mock_argument_constraints_spec.rb", "spec/spec/mocks/precise_counts_spec.rb", "spec/spec/mocks/record_messages_spec.rb", "spec/spec/mocks/stub_spec.rb", "spec/spec/mocks/stubbed_message_expectations_spec.rb", "spec/spec/mocks/twice_counts_spec.rb", "spec/spec/package/bin_spec_spec.rb", "spec/spec/runner/class_and_argument_parser_spec.rb", "spec/spec/runner/command_line_spec.rb", "spec/spec/runner/configuration_spec.rb", "spec/spec/runner/drb_command_line_spec.rb", "spec/spec/runner/empty_file.txt", "spec/spec/runner/example_group_runner_spec.rb", "spec/spec/runner/examples.txt", "spec/spec/runner/failed.txt", "spec/spec/runner/formatter/base_formatter_spec.rb", "spec/spec/runner/formatter/base_text_formatter_spec.rb", "spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb", "spec/spec/runner/formatter/failing_examples_formatter_spec.rb", "spec/spec/runner/formatter/html_formatted-1.8.4.html", "spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.5.html", "spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html", "spec/spec/runner/formatter/html_formatted-1.8.6.html", "spec/spec/runner/formatter/html_formatted-1.8.7.html", "spec/spec/runner/formatter/html_formatted-1.9.1.html", "spec/spec/runner/formatter/html_formatter_spec.rb", "spec/spec/runner/formatter/nested_text_formatter_spec.rb", "spec/spec/runner/formatter/profile_formatter_spec.rb", "spec/spec/runner/formatter/progress_bar_formatter_spec.rb", "spec/spec/runner/formatter/snippet_extractor_spec.rb", "spec/spec/runner/formatter/spec_mate_formatter_spec.rb", "spec/spec/runner/formatter/specdoc_formatter_spec.rb", "spec/spec/runner/formatter/story/html_formatter_spec.rb", "spec/spec/runner/formatter/story/plain_text_formatter_spec.rb", "spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb", "spec/spec/runner/formatter/text_mate_formatted-1.8.4.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.6.html", "spec/spec/runner/formatter/text_mate_formatted-1.8.7.html", "spec/spec/runner/formatter/text_mate_formatted-1.9.1.html", "spec/spec/runner/heckle_runner_spec.rb", "spec/spec/runner/heckler_spec.rb", "spec/spec/runner/noisy_backtrace_tweaker_spec.rb", "spec/spec/runner/option_parser_spec.rb", "spec/spec/runner/options_spec.rb", "spec/spec/runner/output_one_time_fixture.rb", "spec/spec/runner/output_one_time_fixture_runner.rb", "spec/spec/runner/output_one_time_spec.rb", "spec/spec/runner/quiet_backtrace_tweaker_spec.rb", "spec/spec/runner/reporter_spec.rb", "spec/spec/runner/resources/a_bar.rb", "spec/spec/runner/resources/a_foo.rb", "spec/spec/runner/resources/a_spec.rb", "spec/spec/runner/resources/custom_example_group_runner.rb", "spec/spec/runner/resources/utf8_encoded.rb", "spec/spec/runner/spec.opts", "spec/spec/runner/spec_drb.opts", "spec/spec/runner/spec_parser/spec_parser_fixture.rb", "spec/spec/runner/spec_parser_spec.rb", "spec/spec/runner/spec_spaced.opts", "spec/spec/runner_spec.rb", "spec/spec/spec_classes.rb", "spec/spec/spec_spec.rb", "spec/spec/story/builders.rb", "spec/spec/story/extensions/main_spec.rb", "spec/spec/story/extensions_spec.rb", "spec/spec/story/given_scenario_spec.rb", "spec/spec/story/runner/plain_text_story_runner_spec.rb", "spec/spec/story/runner/scenario_collector_spec.rb", "spec/spec/story/runner/scenario_runner_spec.rb", "spec/spec/story/runner/story_mediator_spec.rb", "spec/spec/story/runner/story_parser_spec.rb", "spec/spec/story/runner/story_runner_spec.rb", "spec/spec/story/runner_spec.rb", "spec/spec/story/scenario_spec.rb", "spec/spec/story/step_group_spec.rb", "spec/spec/story/step_mother_spec.rb", "spec/spec/story/step_spec.rb", "spec/spec/story/story_helper.rb", "spec/spec/story/story_spec.rb", "spec/spec/story/world_spec.rb", "spec/spec_helper.rb", "story_server/prototype/javascripts/builder.js", "story_server/prototype/javascripts/controls.js", "story_server/prototype/javascripts/dragdrop.js", "story_server/prototype/javascripts/effects.js", "story_server/prototype/javascripts/prototype.js", "story_server/prototype/javascripts/rspec.js", "story_server/prototype/javascripts/scriptaculous.js", "story_server/prototype/javascripts/slider.js", "story_server/prototype/javascripts/sound.js", "story_server/prototype/javascripts/unittest.js", "story_server/prototype/lib/server.rb", "story_server/prototype/stories.html", "story_server/prototype/stylesheets/rspec.css", "story_server/prototype/stylesheets/test.css"]
15
15
  s.has_rdoc = true
16
16
  s.homepage = %q{http://rspec.info/}
17
17
  s.rdoc_options = ["--main", "README.txt"]
18
18
  s.require_paths = ["lib"]
19
19
  s.rubyforge_project = %q{rspec}
20
- s.rubygems_version = %q{1.3.0}
21
- s.summary = %q{rspec 1.1.11}
20
+ s.rubygems_version = %q{1.3.1}
21
+ s.summary = %q{rspec 1.1.12}
22
+
23
+ if s.respond_to? :specification_version then
24
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
+ s.specification_version = 2
26
+
27
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
+ s.add_development_dependency(%q<cucumber>, [">= 0.1.13"])
29
+ s.add_development_dependency(%q<hoe>, [">= 1.8.2"])
30
+ end
31
+ end
22
32
  end
@@ -1,6 +1,6 @@
1
1
  require "rubygems"
2
2
  require 'autotest'
3
3
  dir = File.dirname(__FILE__)
4
- require "#{dir}/../spec_helper"
4
+ require File.expand_path("#{dir}/../spec_helper")
5
5
  require File.expand_path("#{dir}/../../lib/autotest/rspec")
6
- require "#{dir}/autotest_matchers"
6
+ require File.expand_path("#{dir}/autotest_matchers")
@@ -1,19 +1,8 @@
1
1
  require File.dirname(__FILE__) + "/autotest_helper"
2
2
 
3
- module DiscoveryHelper
4
- def load_discovery
3
+ describe Autotest::Rspec, "discovery" do
4
+ it "adds the rspec autotest plugin" do
5
+ Autotest.should_receive(:add_discovery)
5
6
  require File.dirname(__FILE__) + "/../../lib/autotest/discover"
6
7
  end
7
- end
8
-
9
-
10
- class Autotest
11
- describe Rspec, "discovery" do
12
- include DiscoveryHelper
13
-
14
- it "should add the rspec autotest plugin" do
15
- Autotest.should_receive(:add_discovery).and_yield
16
- load_discovery
17
- end
18
- end
19
- end
8
+ end
@@ -0,0 +1,24 @@
1
+ require File.dirname(__FILE__) + "/autotest_helper"
2
+
3
+ describe "failed_results_re" do
4
+ it "should match a failure" do
5
+ re = Autotest::Rspec.new.failed_results_re
6
+ re =~ "1)\n'this example' FAILED\nreason\n/path.rb:37:\n\n"
7
+ $1.should == "this example"
8
+ $2.should == "reason\n/path.rb:37:"
9
+ end
10
+
11
+ it "should match an Error" do
12
+ re = Autotest::Rspec.new.failed_results_re
13
+ re =~ "1)\nRuntimeError in 'this example'\nreason\n/path.rb:37:\n\n"
14
+ $1.should == "this example"
15
+ $2.should == "reason\n/path.rb:37:"
16
+ end
17
+
18
+ it "should match an Error that doesn't end in Error" do
19
+ re = Autotest::Rspec.new.failed_results_re
20
+ re =~ "1)\nInvalidArgument in 'this example'\nreason\n/path.rb:37:\n\n"
21
+ $1.should == "this example"
22
+ $2.should == "reason\n/path.rb:37:"
23
+ end
24
+ end
@@ -2,40 +2,6 @@ require File.dirname(__FILE__) + "/autotest_helper"
2
2
 
3
3
  class Autotest
4
4
 
5
- module AutotestHelper
6
- def rspec_output
7
- <<-HERE
8
- .............PPF
9
-
10
- 1)
11
- 'false should be false' FAILED
12
- expected: true,
13
- got: false (using ==)
14
- ./spec/autotest/rspec_spec.rb:203:
15
-
16
- Finished in 0.158674 seconds
17
-
18
- 16 examples, 1 failure, 2 pending
19
-
20
- Pending:
21
- Autotest::Rspec handling failed results should return an array of failed examples and errors (TODO)
22
- Autotest::Rspec tests/specs for a given file should find all the specs for a given file (TODO)
23
- HERE
24
- end
25
-
26
- def common_setup
27
- @proc = mock Proc
28
- @kernel = mock Kernel
29
- @kernel.stub!(:proc).and_return @proc
30
-
31
- File.stub!(:exists).and_return true
32
- @windows_alt_separator = "\\"
33
- @posix_separator = '/'
34
-
35
- @rspec_output = rspec_output
36
- end
37
- end
38
-
39
5
  describe Rspec do
40
6
  describe "adding spec.opts --options" do
41
7
  before(:each) do
@@ -60,6 +26,7 @@ HERE
60
26
  @rspec_autotest.stub!(:add_options_if_present).and_return "-O spec/spec.opts"
61
27
 
62
28
  @ruby = @rspec_autotest.ruby
29
+ @spec_cmd = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec'))
63
30
  @options = @rspec_autotest.add_options_if_present
64
31
  @files_to_test = {
65
32
  :spec => ["file_one", "file_two"]
@@ -71,7 +38,7 @@ HERE
71
38
  end
72
39
 
73
40
  it "should make the appropriate test command" do
74
- @rspec_autotest.make_test_cmd(@files_to_test).should == "#{@ruby} -S #{@to_test} #{@options}"
41
+ @rspec_autotest.make_test_cmd(@files_to_test).should == "#{@ruby} #{@spec_cmd} #{@to_test} #{@options}"
75
42
  end
76
43
 
77
44
  it "should return a blank command for no files" do
@@ -106,10 +73,7 @@ HERE
106
73
  end
107
74
 
108
75
  describe "consolidating failures" do
109
- include AutotestHelper
110
-
111
76
  before(:each) do
112
- common_setup
113
77
  @rspec_autotest = Rspec.new
114
78
 
115
79
  @spec_file = "spec/autotest/some_spec.rb"
@@ -0,0 +1,88 @@
1
+ require File.dirname(__FILE__) + '/../../spec_helper.rb'
2
+
3
+ module Spec
4
+ module DSL
5
+ describe Main do
6
+ before(:each) do
7
+ @main = Class.new do; include Spec::DSL::Main; end
8
+ end
9
+
10
+ [:describe, :context].each do |method|
11
+ describe "##{method}" do
12
+ it "should delegate to Spec::Example::ExampleGroupFactory.create_example_group" do
13
+ block = lambda {}
14
+ Spec::Example::ExampleGroupFactory.should_receive(:create_example_group).with(
15
+ "The ExampleGroup", hash_including(:spec_path), &block
16
+ )
17
+ @main.__send__ method, "The ExampleGroup", &block
18
+ end
19
+ end
20
+ end
21
+
22
+ [:share_examples_for, :shared_examples_for].each do |method|
23
+ describe "##{method}" do
24
+ it "should create a shared ExampleGroup" do
25
+ block = lambda {}
26
+ Spec::Example::ExampleGroupFactory.should_receive(:create_shared_example_group).with(
27
+ "shared group", hash_including(:spec_path), &block
28
+ )
29
+ @main.__send__ method, "shared group", &block
30
+ end
31
+ end
32
+ end
33
+
34
+ describe "#describe; with RUBY_VERSION = 1.9" do
35
+ it "includes an enclosing module into the block's scope" do
36
+ Spec::Ruby.stub!(:version).and_return("1.9")
37
+
38
+ module Foo; module Bar; end; end
39
+
40
+ Foo::Bar.should_receive(:included).with do |*args|
41
+ included_by = args.last
42
+ included_by.description.should == "this example group"
43
+ end
44
+
45
+ module Foo
46
+ module Bar
47
+ describe("this example group") do; end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+
54
+ describe "#share_as" do
55
+ def self.next_group_name
56
+ @group_number ||= 0
57
+ @group_number += 1
58
+ "Group#{@group_number}"
59
+ end
60
+
61
+ def group_name
62
+ @group_name ||= self.class.next_group_name
63
+ end
64
+
65
+ it "registers a shared ExampleGroup" do
66
+ block = lambda {}
67
+ Spec::Example::ExampleGroupFactory.should_receive(:create_shared_example_group).with(
68
+ group_name, hash_including(:spec_path), &block
69
+ )
70
+ @main.share_as group_name, &block
71
+ end
72
+
73
+ it "creates a constant that points to a Module" do
74
+ group = @main.share_as group_name do end
75
+ Object.const_get(group_name).should equal(group)
76
+ end
77
+
78
+ it "complains if you pass it a not-constantizable name" do
79
+ lambda do
80
+ @group = @main.share_as "Non Constant" do end
81
+ end.should raise_error(NameError, /The first argument to share_as must be a legal name for a constant/)
82
+ end
83
+
84
+ end
85
+ end
86
+ end
87
+ end
88
+
@@ -3,8 +3,12 @@ require File.dirname(__FILE__) + '/../../spec_helper'
3
3
  module Spec
4
4
  module Example
5
5
  class ExampleGroupSubclass < ExampleGroup
6
- class << self
7
- attr_accessor :examples_ran
6
+ def self.examples_ran
7
+ @examples_ran
8
+ end
9
+
10
+ def self.examples_ran=(examples_ran)
11
+ @examples_ran = examples_ran
8
12
  end
9
13
 
10
14
  @@class_variable = :class_variable
@@ -5,12 +5,12 @@ module Spec
5
5
  describe ExampleGroupFactory do
6
6
  describe "#get" do
7
7
  attr_reader :example_group
8
- before do
8
+ before(:each) do
9
9
  @example_group_class = Class.new(ExampleGroup)
10
10
  ExampleGroupFactory.register(:registered_type, @example_group_class)
11
11
  end
12
12
 
13
- after do
13
+ after(:each) do
14
14
  ExampleGroupFactory.reset
15
15
  end
16
16
 
@@ -57,6 +57,26 @@ module Spec
57
57
  example_group.superclass.should == Spec::Example::ExampleGroup
58
58
  end
59
59
 
60
+ it "should raise when no description is given" do
61
+ lambda {
62
+ Spec::Example::ExampleGroupFactory.create_example_group do; end
63
+ }.should raise_error(ArgumentError)
64
+ end
65
+
66
+ it "should raise when no block is given" do
67
+ lambda { Spec::Example::ExampleGroupFactory.create_example_group "foo" }.should raise_error(ArgumentError)
68
+ end
69
+
70
+ it "should run registered ExampleGroups" do
71
+ example_group = Spec::Example::ExampleGroupFactory.create_example_group "The ExampleGroup" do end
72
+ Spec::Runner.options.example_groups.should include(example_group)
73
+ end
74
+
75
+ it "should not run unregistered ExampleGroups" do
76
+ example_group = Spec::Example::ExampleGroupFactory.create_example_group "The ExampleGroup" do Spec::Runner.options.remove_example_group self; end
77
+ Spec::Runner.options.example_groups.should_not include(example_group)
78
+ end
79
+
60
80
  describe "with :type => :default" do
61
81
  it "should create a Spec::Example::ExampleGroup" do
62
82
  example_group = Spec::Example::ExampleGroupFactory.create_example_group(
@@ -92,6 +112,12 @@ module Spec
92
112
  ) {}
93
113
  custom_example_group.superclass.should == parent_example_group
94
114
  end
115
+
116
+ it "sets the spec_path from the caller" do
117
+ options = {}
118
+ shared_example_group = Spec::Example::ExampleGroupFactory.create_example_group("foo", options) {}
119
+ options[:spec_path].should =~ /#{__FILE__}:#{__LINE__ - 1}/
120
+ end
95
121
 
96
122
  describe "with :shared => true" do
97
123
  def shared_example_group
@@ -102,7 +128,7 @@ module Spec
102
128
 
103
129
  it "should create and register a Spec::Example::SharedExampleGroup" do
104
130
  shared_example_group.should be_an_instance_of(Spec::Example::SharedExampleGroup)
105
- SharedExampleGroup.shared_example_groups.should include(shared_example_group)
131
+ SharedExampleGroup.should include(shared_example_group)
106
132
  end
107
133
  end
108
134
 
@@ -122,17 +148,31 @@ module Spec
122
148
 
123
149
  it "should enable unregistering of ExampleGroups" do
124
150
  example_group = Spec::Example::ExampleGroupFactory.create_example_group("The ExampleGroup") do
125
- unregister
151
+ Spec::Runner.options.remove_example_group self
126
152
  end
127
153
  Spec::Runner.options.example_groups.should_not include(example_group)
128
154
  end
129
-
155
+
130
156
  after(:each) do
131
157
  Spec::Example::ExampleGroupFactory.reset
132
158
  end
133
159
  end
160
+
161
+ describe "#create_shared_example_group" do
162
+ it "registers a new shared example group" do
163
+ shared_example_group = Spec::Example::ExampleGroupFactory.create_shared_example_group("something shared") {}
164
+ shared_example_group.should be_an_instance_of(Spec::Example::SharedExampleGroup)
165
+ SharedExampleGroup.should include(shared_example_group)
166
+ end
167
+
168
+ it "sets the spec_path from the caller" do
169
+ options = {}
170
+ shared_example_group = Spec::Example::ExampleGroupFactory.create_shared_example_group("foo", options) {}
171
+ options[:spec_path].should =~ /#{__FILE__}:#{__LINE__ - 1}/
172
+ end
173
+ end
134
174
 
135
- describe "#all_registered?" do
175
+ describe "#registered_or_ancestor_of_registered?" do
136
176
  before(:each) do
137
177
  @unregistered_parent = Class.new(ExampleGroup)
138
178
  @registered_child = Class.new(@unregistered_parent)
@@ -141,19 +181,19 @@ module Spec
141
181
  end
142
182
 
143
183
  it "should return true for empty list" do
144
- Spec::Example::ExampleGroupFactory.all_registered?([]).should be_true
184
+ Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?([]).should be_true
145
185
  end
146
186
 
147
187
  it "should return true for a registered example group class" do
148
- Spec::Example::ExampleGroupFactory.all_registered?([@registered_child]).should be_true
188
+ Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?([@registered_child]).should be_true
149
189
  end
150
190
 
151
191
  it "should return true for an ancestor of a registered example_group_classes" do
152
- Spec::Example::ExampleGroupFactory.all_registered?([@unregistered_parent]).should be_true
192
+ Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?([@unregistered_parent]).should be_true
153
193
  end
154
194
 
155
195
  it "should return false for a subclass of a registered example_group_class" do
156
- Spec::Example::ExampleGroupFactory.all_registered?([@unregistered_grandchild]).should be_false
196
+ Spec::Example::ExampleGroupFactory.registered_or_ancestor_of_registered?([@unregistered_grandchild]).should be_false
157
197
  end
158
198
 
159
199
  after(:each) do