rspec 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +35 -0
- data/MIT-LICENSE +1 -1
- data/README +9 -44
- data/Rakefile +34 -51
- data/TODO +0 -1
- data/UPGRADE +0 -24
- data/bin/spec +0 -0
- data/bin/spec_translator +0 -0
- data/examples/pure/behave_as_example.rb +0 -0
- data/examples/pure/partial_mock_example.rb +1 -0
- data/examples/stories/calculator.rb +1 -1
- data/lib/autotest/rspec.rb +7 -9
- data/lib/spec/example.rb +1 -1
- data/lib/spec/example/configuration.rb +30 -16
- data/lib/spec/example/example_group.rb +2 -1
- data/lib/spec/example/example_group_factory.rb +23 -21
- data/lib/spec/example/example_group_methods.rb +18 -5
- data/lib/spec/example/example_matcher.rb +0 -0
- data/lib/spec/example/example_methods.rb +6 -0
- data/lib/spec/example/module_inclusion_warnings.rb +37 -0
- data/lib/spec/expectations/differs/default.rb +1 -1
- data/lib/spec/expectations/extensions/object.rb +4 -12
- data/lib/spec/expectations/handler.rb +8 -0
- data/lib/spec/extensions.rb +1 -0
- data/lib/spec/extensions/metaclass.rb +7 -0
- data/lib/spec/extensions/object.rb +0 -4
- data/lib/spec/matchers/change.rb +1 -1
- data/lib/spec/matchers/has.rb +1 -11
- data/lib/spec/matchers/operator_matcher.rb +0 -0
- data/lib/spec/matchers/raise_error.rb +53 -30
- data/lib/spec/mocks.rb +1 -1
- data/lib/spec/mocks/argument_constraint_matchers.rb +5 -1
- data/lib/spec/mocks/argument_expectation.rb +26 -0
- data/lib/spec/mocks/extensions.rb +1 -0
- data/lib/spec/mocks/framework.rb +15 -0
- data/lib/spec/mocks/message_expectation.rb +29 -5
- data/lib/spec/mocks/mock.rb +9 -7
- data/lib/spec/mocks/proxy.rb +26 -12
- data/lib/spec/rake/spectask.rb +5 -5
- data/lib/spec/runner/backtrace_tweaker.rb +1 -1
- data/lib/spec/runner/formatter/base_formatter.rb +2 -3
- data/lib/spec/runner/formatter/base_text_formatter.rb +2 -2
- data/lib/spec/runner/formatter/failing_example_groups_formatter.rb +4 -8
- data/lib/spec/runner/formatter/html_formatter.rb +18 -14
- data/lib/spec/runner/formatter/nested_text_formatter.rb +65 -0
- data/lib/spec/runner/formatter/profile_formatter.rb +4 -0
- data/lib/spec/runner/formatter/progress_bar_formatter.rb +5 -1
- data/lib/spec/runner/formatter/specdoc_formatter.rb +1 -1
- data/lib/spec/runner/formatter/story/plain_text_formatter.rb +18 -7
- data/lib/spec/runner/option_parser.rb +17 -15
- data/lib/spec/runner/options.rb +37 -14
- data/lib/spec/runner/reporter.rb +15 -11
- data/lib/spec/story/extensions/regexp.rb +2 -2
- data/lib/spec/story/extensions/string.rb +2 -2
- data/lib/spec/story/runner.rb +9 -5
- data/lib/spec/story/runner/plain_text_story_runner.rb +2 -2
- data/lib/spec/story/runner/scenario_runner.rb +8 -0
- data/lib/spec/story/runner/story_mediator.rb +1 -1
- data/lib/spec/story/runner/story_runner.rb +3 -1
- data/lib/spec/story/step.rb +4 -4
- data/lib/spec/story/story.rb +8 -11
- data/lib/spec/story/world.rb +0 -1
- data/lib/spec/version.rb +2 -2
- data/plugins/mock_frameworks/rspec.rb +2 -0
- data/spec/autotest/rspec_spec.rb +12 -10
- data/spec/spec/example/configuration_spec.rb +0 -0
- data/spec/spec/example/example_group/described_module_spec.rb +20 -0
- data/spec/spec/example/example_group/warning_messages_spec.rb +76 -0
- data/spec/spec/example/example_group_factory_spec.rb +117 -102
- data/spec/spec/example/example_group_methods_spec.rb +51 -17
- data/spec/spec/example/example_group_spec.rb +13 -1
- data/spec/spec/example/example_methods_spec.rb +28 -6
- data/spec/spec/example/nested_example_group_spec.rb +12 -0
- data/spec/spec/example/predicate_matcher_spec.rb +0 -0
- data/spec/spec/expectations/differs/default_spec.rb +27 -9
- data/spec/spec/matchers/be_spec.rb +24 -0
- data/spec/spec/matchers/has_spec.rb +16 -0
- data/spec/spec/matchers/raise_error_spec.rb +124 -0
- data/spec/spec/mocks/{bug_report_10263.rb → bug_report_10263_spec.rb} +0 -0
- data/spec/spec/mocks/bug_report_11545_spec.rb +2 -0
- data/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +8 -0
- data/spec/spec/mocks/hash_including_matcher_spec.rb +32 -0
- data/spec/spec/mocks/mock_spec.rb +56 -37
- data/spec/spec/mocks/partial_mock_spec.rb +41 -5
- data/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +6 -0
- data/spec/spec/runner/execution_context_spec.rb +7 -1
- data/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +3 -2
- data/spec/spec/runner/formatter/html_formatted-1.8.6.html +30 -25
- data/spec/spec/runner/formatter/html_formatter_spec.rb +0 -3
- data/spec/spec/runner/formatter/nested_text_formatter_spec.rb +333 -0
- data/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +12 -2
- data/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +2 -2
- data/spec/spec/runner/formatter/specdoc_formatter_spec.rb +110 -78
- data/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +105 -1
- data/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +33 -28
- data/spec/spec/runner/option_parser_spec.rb +65 -49
- data/spec/spec/runner/options_spec.rb +103 -17
- data/spec/spec/runner/reporter_spec.rb +10 -7
- data/spec/spec/runner/spec_drb.opts +1 -0
- data/spec/spec/runner/spec_parser_spec.rb +10 -4
- data/spec/spec/story/runner/plain_text_story_runner_spec.rb +14 -13
- data/spec/spec/story/runner/scenario_runner_spec.rb +124 -52
- data/spec/spec/story/runner/story_mediator_spec.rb +2 -2
- data/spec/spec/story/runner/story_runner_spec.rb +40 -2
- data/spec/spec/story/runner_spec.rb +59 -72
- data/spec/spec/story/step_spec.rb +20 -1
- data/spec/spec/story/story_spec.rb +2 -2
- data/stories/all.rb +1 -1
- data/stories/example_groups/stories.rb +4 -3
- data/stories/mock_framework_integration/stories.rb +7 -0
- data/stories/mock_framework_integration/use_flexmock.story +9 -0
- data/stories/resources/spec/spec_with_flexmock.rb +18 -0
- metadata +21 -18
- data/pre_commit/lib/pre_commit.rb +0 -4
- data/pre_commit/lib/pre_commit/core.rb +0 -50
- data/pre_commit/lib/pre_commit/pre_commit.rb +0 -54
- data/pre_commit/lib/pre_commit/rspec.rb +0 -111
- data/pre_commit/lib/pre_commit/rspec_on_rails.rb +0 -313
- data/pre_commit/spec/pre_commit/pre_commit_spec.rb +0 -15
- data/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb +0 -36
- data/pre_commit/spec/spec_helper.rb +0 -3
- data/pre_commit/spec/spec_suite.rb +0 -11
@@ -1,15 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../spec_helper.rb'
|
2
|
-
|
3
|
-
##
|
4
|
-
# This is not a complete specification of PreCommit, but
|
5
|
-
# just a collection of bug fix regression tests.
|
6
|
-
describe "The helper method PreCommit#silent_sh" do
|
7
|
-
before do
|
8
|
-
@pre_commit = PreCommit.new(nil)
|
9
|
-
end
|
10
|
-
|
11
|
-
# bug in r1802
|
12
|
-
it "should return the command output" do
|
13
|
-
@pre_commit.send(:silent_sh, "echo foo").should ==("foo\n")
|
14
|
-
end
|
15
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/../spec_helper.rb'
|
2
|
-
require 'fileutils'
|
3
|
-
|
4
|
-
include FileUtils
|
5
|
-
|
6
|
-
##
|
7
|
-
# This is not a complete specification of PreCommit.RSpecOnRails, but
|
8
|
-
# just a collection of bug fix regression tests.
|
9
|
-
describe "RSpecOnRails pre_commit" do
|
10
|
-
before do
|
11
|
-
@original_dir = File.expand_path(FileUtils.pwd)
|
12
|
-
@rails_app_dir = File.expand_path(File.dirname(__FILE__) + "/../../../example_rails_app/")
|
13
|
-
|
14
|
-
Dir.chdir(@rails_app_dir)
|
15
|
-
rm_rf('vendor/plugins/rspec_on_rails')
|
16
|
-
system("svn export ../rspec_on_rails vendor/plugins/rspec_on_rails")
|
17
|
-
|
18
|
-
@pre_commit = PreCommit::RspecOnRails.new(nil)
|
19
|
-
end
|
20
|
-
|
21
|
-
after do
|
22
|
-
rm('db/migrate/888_create_purchases.rb', :force => true)
|
23
|
-
@pre_commit.destroy_purchase
|
24
|
-
Dir.chdir(@original_dir)
|
25
|
-
end
|
26
|
-
|
27
|
-
# bug in r1802
|
28
|
-
it "should fail noisily if there is a migration name conflict" do
|
29
|
-
touch('db/migrate/888_create_purchases.rb')
|
30
|
-
lambda { @pre_commit.generate_purchase }.should raise_error
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should not fail if tests run ok" do
|
34
|
-
lambda { @pre_commit.generate_purchase }.should_not raise_error
|
35
|
-
end
|
36
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
class SpecSuite
|
2
|
-
def run
|
3
|
-
system("ruby rspec/spec/rspec_suite.rb") || raise("Rspec Suite FAILED")
|
4
|
-
system("ruby rspec_on_rails/spec/rails_suite.rb") || raise("Rails Suite FAILED")
|
5
|
-
system("ruby cached_example_rails_app/spec/rails_app_suite.rb") || raise("Rails App Suite FAILED")
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
if $0 == __FILE__
|
10
|
-
SpecSuite.new.run
|
11
|
-
end
|