rspec 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. data/CHANGES +17 -0
  2. data/Rakefile +7 -4
  3. data/failing_examples/README.txt +7 -0
  4. data/failing_examples/diffing_spec.rb +36 -0
  5. data/failing_examples/failing_autogenerated_docstrings_example.rb +19 -0
  6. data/failing_examples/failure_in_setup.rb +10 -0
  7. data/failing_examples/failure_in_teardown.rb +10 -0
  8. data/failing_examples/mocking_example.rb +40 -0
  9. data/failing_examples/mocking_with_flexmock.rb +26 -0
  10. data/failing_examples/mocking_with_mocha.rb +25 -0
  11. data/failing_examples/mocking_with_rr.rb +27 -0
  12. data/failing_examples/partial_mock_example.rb +20 -0
  13. data/failing_examples/predicate_example.rb +29 -0
  14. data/failing_examples/raising_example.rb +47 -0
  15. data/failing_examples/spec_helper.rb +3 -0
  16. data/failing_examples/syntax_error_example.rb +7 -0
  17. data/failing_examples/team_spec.rb +44 -0
  18. data/failing_examples/timeout_behaviour.rb +7 -0
  19. data/lib/autotest/rspec.rb +21 -35
  20. data/lib/spec.rb +0 -7
  21. data/lib/spec/example/example_group_methods.rb +10 -4
  22. data/lib/spec/example/example_methods.rb +4 -0
  23. data/lib/spec/interop/test.rb +3 -1
  24. data/lib/spec/interop/test/unit/ui/console/testrunner.rb +1 -0
  25. data/lib/spec/matchers/raise_error.rb +19 -15
  26. data/lib/spec/runner.rb +14 -0
  27. data/lib/spec/runner/formatter/story/html_formatter.rb +3 -0
  28. data/lib/spec/runner/formatter/story/plain_text_formatter.rb +4 -1
  29. data/lib/spec/runner/option_parser.rb +5 -33
  30. data/lib/spec/runner/options.rb +51 -18
  31. data/lib/spec/runner/spec_parser.rb +49 -31
  32. data/lib/spec/story/runner.rb +0 -2
  33. data/lib/spec/story/step.rb +8 -6
  34. data/lib/spec/story/world.rb +1 -0
  35. data/lib/spec/version.rb +22 -22
  36. data/pre_commit/lib/pre_commit.rb +4 -0
  37. data/pre_commit/lib/pre_commit/core.rb +50 -0
  38. data/pre_commit/lib/pre_commit/pre_commit.rb +54 -0
  39. data/pre_commit/lib/pre_commit/rspec.rb +111 -0
  40. data/pre_commit/lib/pre_commit/rspec_on_rails.rb +313 -0
  41. data/pre_commit/spec/pre_commit/pre_commit_spec.rb +15 -0
  42. data/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +36 -0
  43. data/pre_commit/spec/spec_helper.rb +3 -0
  44. data/pre_commit/spec/spec_suite.rb +11 -0
  45. data/rake_tasks/examples.rake +7 -0
  46. data/rake_tasks/examples_with_rcov.rake +9 -0
  47. data/rake_tasks/failing_examples_with_html.rake +9 -0
  48. data/rake_tasks/verify_rcov.rake +7 -0
  49. data/spec/README.jruby +15 -0
  50. data/spec/autotest/rspec_spec.rb +11 -80
  51. data/spec/autotest_helper.rb +2 -1
  52. data/spec/autotest_matchers.rb +47 -0
  53. data/spec/rspec_suite.rb +1 -1
  54. data/spec/spec.opts +6 -0
  55. data/spec/spec/example/example_group_methods_spec.rb +11 -2
  56. data/spec/spec/example/example_methods_spec.rb +69 -56
  57. data/spec/spec/interop/test/unit/resources/spec_that_fails.rb +10 -0
  58. data/spec/spec/interop/test/unit/resources/spec_that_passes.rb +10 -0
  59. data/spec/spec/interop/test/unit/resources/spec_with_errors.rb +10 -0
  60. data/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +10 -0
  61. data/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +10 -0
  62. data/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +10 -0
  63. data/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +38 -0
  64. data/spec/spec/interop/test/unit/spec_spec.rb +45 -0
  65. data/spec/spec/interop/test/unit/testcase_spec.rb +39 -4
  66. data/spec/spec/interop/test/unit/testsuite_adapter_spec.rb +1 -1
  67. data/spec/spec/matchers/raise_error_spec.rb +7 -1
  68. data/spec/spec/mocks/bug_report_10263.rb +1 -1
  69. data/spec/spec/runner/command_line_spec.rb +3 -2
  70. data/spec/spec/runner/empty_file.txt +0 -0
  71. data/spec/spec/runner/examples.txt +2 -0
  72. data/spec/spec/runner/failed.txt +3 -0
  73. data/spec/spec/runner/formatter/html_formatted-1.8.4.html +365 -0
  74. data/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +387 -0
  75. data/spec/spec/runner/formatter/html_formatted-1.8.5.html +371 -0
  76. data/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +381 -0
  77. data/spec/spec/runner/formatter/html_formatted-1.8.6.html +365 -0
  78. data/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +54 -54
  79. data/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +365 -0
  80. data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +365 -0
  81. data/spec/spec/runner/option_parser_spec.rb +50 -49
  82. data/spec/spec/runner/options_spec.rb +72 -2
  83. data/spec/spec/runner/resources/a_bar.rb +0 -0
  84. data/spec/spec/runner/resources/a_foo.rb +0 -0
  85. data/spec/spec/runner/resources/a_spec.rb +1 -0
  86. data/spec/spec/runner/spec.opts +2 -0
  87. data/spec/spec/runner/spec_parser/spec_parser_fixture.rb +70 -0
  88. data/spec/spec/runner/spec_parser_spec.rb +31 -76
  89. data/spec/spec/runner/spec_spaced.opts +2 -0
  90. data/spec/spec/spec_classes.rb +4 -0
  91. data/spec/spec/story/step_spec.rb +22 -0
  92. data/spec/spec/story/world_spec.rb +7 -0
  93. data/stories/interop/test_case_with_should_methods +1 -1
  94. metadata +85 -5
  95. data/spec/spec/interop/test/unit/testcase_spec_with_test_unit.rb +0 -20
  96. data/spec/spec/interop/test/unit/testsuite_adapter_spec_with_test_unit.rb +0 -34
@@ -1,20 +0,0 @@
1
- require "test/unit"
2
- require File.dirname(__FILE__) + '/../../../../spec_helper.rb'
3
-
4
- describe "TestCase#method_name" do
5
- it "should equal the description of the example" do
6
- @method_name.should == "should equal the description of the example"
7
- end
8
-
9
- def test_this
10
- true.should be_true
11
- end
12
-
13
- def testThis
14
- true.should be_true
15
- end
16
-
17
- def testament
18
- raise "testament is not a test"
19
- end
20
- end
@@ -1,34 +0,0 @@
1
- require "test/unit"
2
- require File.dirname(__FILE__) + '/../../../../spec_helper.rb'
3
-
4
- module TestSuiteAdapterSpecHelper
5
- def create_adapter(group)
6
- Test::Unit::TestSuiteAdapter.new(group)
7
- end
8
- end
9
-
10
- describe "TestSuiteAdapter#size" do
11
- include TestSuiteAdapterSpecHelper
12
- it "should return the number of examples in the example group" do
13
- group = Class.new(Spec::ExampleGroup) do
14
- describe("some examples")
15
- it("bar") {}
16
- it("baz") {}
17
- end
18
- adapter = create_adapter(group)
19
- adapter.size.should == 2
20
- end
21
- end
22
-
23
- describe "TestSuiteAdapter#delete" do
24
- include TestSuiteAdapterSpecHelper
25
- it "should do nothing" do
26
- group = Class.new(Spec::ExampleGroup) do
27
- describe("Some Examples")
28
- it("does something") {}
29
- end
30
- adapter = create_adapter(group)
31
- adapter.delete(adapter.examples.first)
32
- adapter.should be_empty
33
- end
34
- end