rspec-core 2.0.0.beta.22 → 2.0.0.rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +2 -2
- data/{History.md → History.markdown} +24 -2
- data/Rakefile +1 -0
- data/Upgrade.markdown +36 -3
- data/bin/rspec +1 -2
- data/features/command_line/configure.feature +4 -4
- data/features/command_line/example_name_option.feature +17 -3
- data/features/command_line/exit_status.feature +13 -28
- data/features/command_line/line_number_appended_to_path.feature +12 -16
- data/features/command_line/line_number_option.feature +4 -5
- data/features/command_line/rake_task.feature +68 -0
- data/features/configuration/custom_settings.feature +2 -4
- data/features/configuration/fail_fast.feature +77 -0
- data/features/configuration/read_options_from_file.feature +2 -5
- data/features/example_groups/basic_structure.feature +54 -0
- data/features/example_groups/shared_example_group.feature +38 -27
- data/features/filtering/exclusion_filters.feature +40 -4
- data/features/filtering/inclusion_filters.feature +36 -27
- data/features/filtering/run_all_when_everything_filtered.feature +46 -0
- data/features/hooks/before_and_after_hooks.feature +21 -1
- data/features/pending/pending_examples.feature +24 -5
- data/lib/rspec/autorun.rb +2 -0
- data/lib/rspec/core.rb +6 -4
- data/lib/rspec/core/configuration.rb +69 -23
- data/lib/rspec/core/configuration_options.rb +1 -0
- data/lib/rspec/core/example.rb +0 -1
- data/lib/rspec/core/example_group.rb +23 -8
- data/lib/rspec/core/formatters/base_formatter.rb +14 -4
- data/lib/rspec/core/formatters/base_text_formatter.rb +2 -0
- data/lib/rspec/core/formatters/documentation_formatter.rb +2 -0
- data/lib/rspec/core/formatters/progress_formatter.rb +1 -0
- data/lib/rspec/core/metadata.rb +18 -11
- data/lib/rspec/core/option_parser.rb +6 -1
- data/lib/rspec/core/rake_task.rb +10 -10
- data/lib/rspec/core/runner.rb +20 -1
- data/lib/rspec/core/subject.rb +26 -3
- data/lib/rspec/core/version.rb +1 -1
- data/lib/rspec/core/world.rb +2 -1
- data/spec/autotest/failed_results_re_spec.rb +1 -1
- data/spec/rspec/core/configuration_spec.rb +13 -0
- data/spec/rspec/core/example_group_spec.rb +107 -26
- data/spec/rspec/core/example_spec.rb +11 -24
- data/spec/rspec/core/formatters/base_formatter_spec.rb +17 -1
- data/spec/rspec/core/formatters/base_text_formatter_spec.rb +6 -5
- data/spec/rspec/core/formatters/documentation_formatter_spec.rb +3 -2
- data/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +25 -22
- data/spec/rspec/core/formatters/html_formatted-1.8.7.html +23 -20
- data/spec/rspec/core/formatters/html_formatted-1.9.1.html +25 -22
- data/spec/rspec/core/formatters/html_formatted-1.9.2.html +25 -2
- data/spec/rspec/core/formatters/html_formatter_spec.rb +10 -2
- data/spec/rspec/core/formatters/progress_formatter_spec.rb +1 -0
- data/spec/rspec/core/formatters/text_mate_formatter_spec.rb +1 -0
- data/spec/rspec/core/hooks_filtering_spec.rb +5 -5
- data/spec/rspec/core/hooks_spec.rb +4 -4
- data/spec/rspec/core/metadata_spec.rb +20 -0
- data/spec/rspec/core/option_parser_spec.rb +16 -0
- data/spec/rspec/core/rake_task_spec.rb +0 -1
- data/spec/rspec/core/reporter_spec.rb +1 -1
- data/spec/rspec/core/runner_spec.rb +18 -0
- data/spec/rspec/core/shared_example_group_spec.rb +2 -2
- data/spec/spec_helper.rb +14 -3
- metadata +54 -45
- data/.rspec +0 -1
- data/features/example_groups/describe_aliases.feature +0 -25
- data/features/example_groups/nested_groups.feature +0 -44
- data/lib/rspec/core/around_proxy.rb +0 -14
- data/lib/rspec/core/formatters.rb +0 -8
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|
@@ -1,25 +0,0 @@
|
|
1
|
-
Feature: Nested example groups
|
2
|
-
|
3
|
-
As an RSpec user
|
4
|
-
I want to use alternate names for describe
|
5
|
-
So that I can better organize my examples
|
6
|
-
|
7
|
-
Scenario: Using context
|
8
|
-
Given a file named "context_instead_of_describe_spec.rb" with:
|
9
|
-
"""
|
10
|
-
require "rspec/expectations"
|
11
|
-
|
12
|
-
describe "Using context" do
|
13
|
-
context "with nested context" do
|
14
|
-
it "should do this" do
|
15
|
-
true.should be_true
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
"""
|
20
|
-
When I run "rspec ./context_instead_of_describe_spec.rb -fn"
|
21
|
-
Then the output should contain:
|
22
|
-
"""
|
23
|
-
Using context
|
24
|
-
with nested context
|
25
|
-
"""
|
@@ -1,44 +0,0 @@
|
|
1
|
-
Feature: Nested example groups
|
2
|
-
|
3
|
-
As an RSpec user
|
4
|
-
I want to nest examples groups
|
5
|
-
So that I can better organize my examples
|
6
|
-
|
7
|
-
Scenario: Nested example groups
|
8
|
-
Given a file named "nested_example_groups.rb" with:
|
9
|
-
"""
|
10
|
-
describe "Some Object" do
|
11
|
-
describe "with some more context" do
|
12
|
-
it "should do this" do
|
13
|
-
true.should be_true
|
14
|
-
end
|
15
|
-
end
|
16
|
-
describe "with some other context" do
|
17
|
-
it "should do that" do
|
18
|
-
false.should be_false
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
"""
|
23
|
-
When I run "rspec nested_example_groups.rb -fdoc"
|
24
|
-
Then the output should contain "Some Object"
|
25
|
-
And the output should contain "with some more context"
|
26
|
-
And the output should contain "with some other context"
|
27
|
-
|
28
|
-
Scenario: failure in outer group continues to run inner groups
|
29
|
-
Given a file named "nested_example_groups.rb" with:
|
30
|
-
"""
|
31
|
-
describe "something" do
|
32
|
-
it "fails" do
|
33
|
-
raise "failure"
|
34
|
-
end
|
35
|
-
|
36
|
-
context "nested" do
|
37
|
-
it "passes" do
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
"""
|
42
|
-
When I run "rspec nested_example_groups.rb -fdoc"
|
43
|
-
Then the output should contain "2 examples, 1 failure"
|
44
|
-
And the output should contain "passes"
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module RSpec
|
2
|
-
module Core
|
3
|
-
class AroundProxy
|
4
|
-
def initialize(example_group_instance, &example_block)
|
5
|
-
@example_group_instance, @example_block = example_group_instance, example_block
|
6
|
-
end
|
7
|
-
|
8
|
-
def run
|
9
|
-
@example_group_instance.instance_eval(&@example_block)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
@@ -1,8 +0,0 @@
|
|
1
|
-
require 'rspec/core/formatters/helpers'
|
2
|
-
require 'rspec/core/formatters/base_formatter'
|
3
|
-
require 'rspec/core/formatters/base_text_formatter'
|
4
|
-
require 'rspec/core/formatters/documentation_formatter'
|
5
|
-
require 'rspec/core/formatters/progress_formatter'
|
6
|
-
require 'rspec/core/formatters/html_formatter'
|
7
|
-
require 'rspec/core/formatters/text_mate_formatter'
|
8
|
-
|