rspec 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +17 -0
- data/Rakefile +7 -4
- data/failing_examples/README.txt +7 -0
- data/failing_examples/diffing_spec.rb +36 -0
- data/failing_examples/failing_autogenerated_docstrings_example.rb +19 -0
- data/failing_examples/failure_in_setup.rb +10 -0
- data/failing_examples/failure_in_teardown.rb +10 -0
- data/failing_examples/mocking_example.rb +40 -0
- data/failing_examples/mocking_with_flexmock.rb +26 -0
- data/failing_examples/mocking_with_mocha.rb +25 -0
- data/failing_examples/mocking_with_rr.rb +27 -0
- data/failing_examples/partial_mock_example.rb +20 -0
- data/failing_examples/predicate_example.rb +29 -0
- data/failing_examples/raising_example.rb +47 -0
- data/failing_examples/spec_helper.rb +3 -0
- data/failing_examples/syntax_error_example.rb +7 -0
- data/failing_examples/team_spec.rb +44 -0
- data/failing_examples/timeout_behaviour.rb +7 -0
- data/lib/autotest/rspec.rb +21 -35
- data/lib/spec.rb +0 -7
- data/lib/spec/example/example_group_methods.rb +10 -4
- data/lib/spec/example/example_methods.rb +4 -0
- data/lib/spec/interop/test.rb +3 -1
- data/lib/spec/interop/test/unit/ui/console/testrunner.rb +1 -0
- data/lib/spec/matchers/raise_error.rb +19 -15
- data/lib/spec/runner.rb +14 -0
- data/lib/spec/runner/formatter/story/html_formatter.rb +3 -0
- data/lib/spec/runner/formatter/story/plain_text_formatter.rb +4 -1
- data/lib/spec/runner/option_parser.rb +5 -33
- data/lib/spec/runner/options.rb +51 -18
- data/lib/spec/runner/spec_parser.rb +49 -31
- data/lib/spec/story/runner.rb +0 -2
- data/lib/spec/story/step.rb +8 -6
- data/lib/spec/story/world.rb +1 -0
- data/lib/spec/version.rb +22 -22
- data/pre_commit/lib/pre_commit.rb +4 -0
- data/pre_commit/lib/pre_commit/core.rb +50 -0
- data/pre_commit/lib/pre_commit/pre_commit.rb +54 -0
- data/pre_commit/lib/pre_commit/rspec.rb +111 -0
- data/pre_commit/lib/pre_commit/rspec_on_rails.rb +313 -0
- data/pre_commit/spec/pre_commit/pre_commit_spec.rb +15 -0
- data/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +36 -0
- data/pre_commit/spec/spec_helper.rb +3 -0
- data/pre_commit/spec/spec_suite.rb +11 -0
- data/rake_tasks/examples.rake +7 -0
- data/rake_tasks/examples_with_rcov.rake +9 -0
- data/rake_tasks/failing_examples_with_html.rake +9 -0
- data/rake_tasks/verify_rcov.rake +7 -0
- data/spec/README.jruby +15 -0
- data/spec/autotest/rspec_spec.rb +11 -80
- data/spec/autotest_helper.rb +2 -1
- data/spec/autotest_matchers.rb +47 -0
- data/spec/rspec_suite.rb +1 -1
- data/spec/spec.opts +6 -0
- data/spec/spec/example/example_group_methods_spec.rb +11 -2
- data/spec/spec/example/example_methods_spec.rb +69 -56
- data/spec/spec/interop/test/unit/resources/spec_that_fails.rb +10 -0
- data/spec/spec/interop/test/unit/resources/spec_that_passes.rb +10 -0
- data/spec/spec/interop/test/unit/resources/spec_with_errors.rb +10 -0
- data/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +10 -0
- data/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +10 -0
- data/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +10 -0
- data/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +38 -0
- data/spec/spec/interop/test/unit/spec_spec.rb +45 -0
- data/spec/spec/interop/test/unit/testcase_spec.rb +39 -4
- data/spec/spec/interop/test/unit/testsuite_adapter_spec.rb +1 -1
- data/spec/spec/matchers/raise_error_spec.rb +7 -1
- data/spec/spec/mocks/bug_report_10263.rb +1 -1
- data/spec/spec/runner/command_line_spec.rb +3 -2
- data/spec/spec/runner/empty_file.txt +0 -0
- data/spec/spec/runner/examples.txt +2 -0
- data/spec/spec/runner/failed.txt +3 -0
- data/spec/spec/runner/formatter/html_formatted-1.8.4.html +365 -0
- data/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +387 -0
- data/spec/spec/runner/formatter/html_formatted-1.8.5.html +371 -0
- data/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +381 -0
- data/spec/spec/runner/formatter/html_formatted-1.8.6.html +365 -0
- data/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +54 -54
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +365 -0
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +365 -0
- data/spec/spec/runner/option_parser_spec.rb +50 -49
- data/spec/spec/runner/options_spec.rb +72 -2
- data/spec/spec/runner/resources/a_bar.rb +0 -0
- data/spec/spec/runner/resources/a_foo.rb +0 -0
- data/spec/spec/runner/resources/a_spec.rb +1 -0
- data/spec/spec/runner/spec.opts +2 -0
- data/spec/spec/runner/spec_parser/spec_parser_fixture.rb +70 -0
- data/spec/spec/runner/spec_parser_spec.rb +31 -76
- data/spec/spec/runner/spec_spaced.opts +2 -0
- data/spec/spec/spec_classes.rb +4 -0
- data/spec/spec/story/step_spec.rb +22 -0
- data/spec/spec/story/world_spec.rb +7 -0
- data/stories/interop/test_case_with_should_methods +1 -1
- metadata +85 -5
- data/spec/spec/interop/test/unit/testcase_spec_with_test_unit.rb +0 -20
- 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
|