rspec-core 2.0.0.beta.9 → 2.0.0.beta.10
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/features/configuration/custom_settings.feature +86 -0
- data/features/formatters/custom_formatter.feature +1 -1
- data/lib/rspec/core.rb +6 -1
- data/lib/rspec/core/backward_compatibility.rb +3 -5
- data/lib/rspec/core/command_line.rb +52 -0
- data/lib/rspec/core/configuration.rb +106 -118
- data/lib/rspec/core/configuration_options.rb +30 -88
- data/lib/rspec/core/deprecation.rb +3 -4
- data/lib/rspec/core/drb_command_line.rb +29 -0
- data/lib/rspec/core/formatters/base_formatter.rb +3 -8
- data/lib/rspec/core/formatters/base_text_formatter.rb +2 -2
- data/lib/rspec/core/formatters/documentation_formatter.rb +2 -2
- data/lib/rspec/core/kernel_extensions.rb +1 -1
- data/lib/rspec/core/metadata.rb +11 -11
- data/lib/rspec/core/option_parser.rb +84 -0
- data/lib/rspec/core/runner.rb +17 -42
- data/lib/rspec/core/world.rb +2 -2
- data/lib/rspec/monkey.rb +1 -0
- data/lib/rspec/monkey/spork/test_framework/rspec.rb +7 -0
- data/rspec-core.gemspec +18 -59
- data/spec/rspec/core/configuration_options_spec.rb +91 -7
- data/spec/rspec/core/configuration_spec.rb +52 -18
- data/spec/rspec/core/deprecations_spec.rb +4 -2
- data/spec/rspec/core/drb_command_line_spec.rb +151 -0
- data/spec/rspec/core/formatters/base_formatter_spec.rb +2 -1
- data/spec/rspec/core/formatters/base_text_formatter_spec.rb +1 -2
- data/spec/rspec/core/formatters/documentation_formatter_spec.rb +1 -2
- data/spec/rspec/core/formatters/progress_formatter_spec.rb +1 -2
- data/spec/rspec/core/resources/a_spec.rb +1 -1
- data/spec/rspec/core/runner_spec.rb +38 -27
- data/spec/rspec/core/shared_example_group_spec.rb +1 -1
- data/spec/spec_helper.rb +56 -41
- metadata +17 -58
- data/example_specs/failing/README.txt +0 -7
- data/example_specs/failing/diffing_spec.rb +0 -38
- data/example_specs/failing/failing_implicit_docstrings_example.rb +0 -19
- data/example_specs/failing/failure_in_after.rb +0 -10
- data/example_specs/failing/failure_in_before.rb +0 -10
- data/example_specs/failing/mocking_example.rb +0 -40
- data/example_specs/failing/mocking_with_flexmock.rb +0 -26
- data/example_specs/failing/mocking_with_mocha.rb +0 -25
- data/example_specs/failing/mocking_with_rr.rb +0 -27
- data/example_specs/failing/partial_mock_example.rb +0 -20
- data/example_specs/failing/pending_example.rb +0 -9
- data/example_specs/failing/predicate_example.rb +0 -34
- data/example_specs/failing/raising_example.rb +0 -47
- data/example_specs/failing/spec_helper.rb +0 -1
- data/example_specs/failing/syntax_error_example.rb +0 -7
- data/example_specs/failing/team_spec.rb +0 -43
- data/example_specs/failing/timeout_behaviour.rb +0 -7
- data/example_specs/passing/custom_formatter.rb +0 -12
- data/example_specs/passing/custom_matchers.rb +0 -54
- data/example_specs/passing/dynamic_spec.rb +0 -9
- data/example_specs/passing/file_accessor.rb +0 -19
- data/example_specs/passing/file_accessor_spec.rb +0 -38
- data/example_specs/passing/filtered_formatter.rb +0 -18
- data/example_specs/passing/filtered_formatter_example.rb +0 -31
- data/example_specs/passing/greeter_spec.rb +0 -31
- data/example_specs/passing/helper_method_example.rb +0 -14
- data/example_specs/passing/implicit_docstrings_example.rb +0 -18
- data/example_specs/passing/io_processor.rb +0 -8
- data/example_specs/passing/io_processor_spec.rb +0 -21
- data/example_specs/passing/mocking_example.rb +0 -27
- data/example_specs/passing/multi_threaded_example_group_runner.rb +0 -26
- data/example_specs/passing/nested_classes_example.rb +0 -36
- data/example_specs/passing/options_example.rb +0 -31
- data/example_specs/passing/options_formatter.rb +0 -20
- data/example_specs/passing/partial_mock_example.rb +0 -29
- data/example_specs/passing/pending_example.rb +0 -20
- data/example_specs/passing/predicate_example.rb +0 -27
- data/example_specs/passing/shared_example_group_example.rb +0 -81
- data/example_specs/passing/shared_stack_examples.rb +0 -36
- data/example_specs/passing/spec_helper.rb +0 -1
- data/example_specs/passing/stack.rb +0 -36
- data/example_specs/passing/stack_spec.rb +0 -64
- data/example_specs/passing/stack_spec_with_nested_example_groups.rb +0 -67
- data/example_specs/passing/stubbing_example.rb +0 -69
- data/example_specs/passing/subject_example.rb +0 -45
- data/example_specs/passing/yielding_example.rb +0 -33
- data/example_specs/ruby1.9.compatibility/access_to_constants_spec.rb +0 -85
- data/example_specs/spec_helper.rb +0 -10
- data/features/configuration/custom_options.feature +0 -71
@@ -1,10 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
-
$LOAD_PATH << File.expand_path('../../../rspec-expectations/lib', __FILE__)
|
3
|
-
$LOAD_PATH << File.expand_path('../../../rspec-mocks/lib', __FILE__)
|
4
|
-
require 'rspec/expectations'
|
5
|
-
require 'rspec/core'
|
6
|
-
|
7
|
-
RSpec.configure do |c|
|
8
|
-
c.mock_with :rspec
|
9
|
-
end
|
10
|
-
|
@@ -1,71 +0,0 @@
|
|
1
|
-
Feature: custom options
|
2
|
-
|
3
|
-
In order to seamlessly provide my users more options
|
4
|
-
As an RSpec extenstion-library author
|
5
|
-
I want to define new options on the RSpec.configuration
|
6
|
-
|
7
|
-
Scenario: boolean option with default settings
|
8
|
-
Given a file named "boolean_option_spec.rb" with:
|
9
|
-
"""
|
10
|
-
RSpec.configure do |c|
|
11
|
-
c.add_option :custom_option, :type => :boolean
|
12
|
-
end
|
13
|
-
|
14
|
-
describe "custom option" do
|
15
|
-
it "is false by default" do
|
16
|
-
RSpec.configuration.custom_option.should be_false
|
17
|
-
end
|
18
|
-
|
19
|
-
it "is exposed as a predicate" do
|
20
|
-
RSpec.configuration.custom_option?.should be_false
|
21
|
-
end
|
22
|
-
end
|
23
|
-
"""
|
24
|
-
When I run "rspec ./boolean_option_spec.rb"
|
25
|
-
Then I should see "2 examples, 0 failures"
|
26
|
-
|
27
|
-
Scenario: boolean option set to default to true
|
28
|
-
Given a file named "boolean_option_spec.rb" with:
|
29
|
-
"""
|
30
|
-
RSpec.configure do |c|
|
31
|
-
c.add_option :custom_option, :type => :boolean, :default => true
|
32
|
-
end
|
33
|
-
|
34
|
-
describe "custom option" do
|
35
|
-
it "is true by default" do
|
36
|
-
RSpec.configuration.custom_option.should be_true
|
37
|
-
end
|
38
|
-
|
39
|
-
it "is exposed as a predicate" do
|
40
|
-
RSpec.configuration.custom_option?.should be_true
|
41
|
-
end
|
42
|
-
end
|
43
|
-
"""
|
44
|
-
When I run "rspec ./boolean_option_spec.rb"
|
45
|
-
Then I should see "2 examples, 0 failures"
|
46
|
-
|
47
|
-
@wip
|
48
|
-
Scenario: boolean option overridden in client app
|
49
|
-
Given a file named "boolean_option_spec.rb" with:
|
50
|
-
"""
|
51
|
-
RSpec.configure do |c|
|
52
|
-
c.add_option :custom_option, :type => :boolean
|
53
|
-
end
|
54
|
-
|
55
|
-
RSpec.configure do |c|
|
56
|
-
c.custom_option = true
|
57
|
-
end
|
58
|
-
|
59
|
-
describe "custom option" do
|
60
|
-
it "returns the value set in the client app" do
|
61
|
-
RSpec.configuration.custom_option.should be_true
|
62
|
-
end
|
63
|
-
|
64
|
-
it "is exposed as a predicate" do
|
65
|
-
RSpec.configuration.custom_option?.should be_true
|
66
|
-
end
|
67
|
-
end
|
68
|
-
"""
|
69
|
-
When I run "rspec ./boolean_option_spec.rb"
|
70
|
-
Then I should see "2 examples, 0 failures"
|
71
|
-
|