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.
Files changed (83) hide show
  1. data/VERSION +1 -1
  2. data/features/configuration/custom_settings.feature +86 -0
  3. data/features/formatters/custom_formatter.feature +1 -1
  4. data/lib/rspec/core.rb +6 -1
  5. data/lib/rspec/core/backward_compatibility.rb +3 -5
  6. data/lib/rspec/core/command_line.rb +52 -0
  7. data/lib/rspec/core/configuration.rb +106 -118
  8. data/lib/rspec/core/configuration_options.rb +30 -88
  9. data/lib/rspec/core/deprecation.rb +3 -4
  10. data/lib/rspec/core/drb_command_line.rb +29 -0
  11. data/lib/rspec/core/formatters/base_formatter.rb +3 -8
  12. data/lib/rspec/core/formatters/base_text_formatter.rb +2 -2
  13. data/lib/rspec/core/formatters/documentation_formatter.rb +2 -2
  14. data/lib/rspec/core/kernel_extensions.rb +1 -1
  15. data/lib/rspec/core/metadata.rb +11 -11
  16. data/lib/rspec/core/option_parser.rb +84 -0
  17. data/lib/rspec/core/runner.rb +17 -42
  18. data/lib/rspec/core/world.rb +2 -2
  19. data/lib/rspec/monkey.rb +1 -0
  20. data/lib/rspec/monkey/spork/test_framework/rspec.rb +7 -0
  21. data/rspec-core.gemspec +18 -59
  22. data/spec/rspec/core/configuration_options_spec.rb +91 -7
  23. data/spec/rspec/core/configuration_spec.rb +52 -18
  24. data/spec/rspec/core/deprecations_spec.rb +4 -2
  25. data/spec/rspec/core/drb_command_line_spec.rb +151 -0
  26. data/spec/rspec/core/formatters/base_formatter_spec.rb +2 -1
  27. data/spec/rspec/core/formatters/base_text_formatter_spec.rb +1 -2
  28. data/spec/rspec/core/formatters/documentation_formatter_spec.rb +1 -2
  29. data/spec/rspec/core/formatters/progress_formatter_spec.rb +1 -2
  30. data/spec/rspec/core/resources/a_spec.rb +1 -1
  31. data/spec/rspec/core/runner_spec.rb +38 -27
  32. data/spec/rspec/core/shared_example_group_spec.rb +1 -1
  33. data/spec/spec_helper.rb +56 -41
  34. metadata +17 -58
  35. data/example_specs/failing/README.txt +0 -7
  36. data/example_specs/failing/diffing_spec.rb +0 -38
  37. data/example_specs/failing/failing_implicit_docstrings_example.rb +0 -19
  38. data/example_specs/failing/failure_in_after.rb +0 -10
  39. data/example_specs/failing/failure_in_before.rb +0 -10
  40. data/example_specs/failing/mocking_example.rb +0 -40
  41. data/example_specs/failing/mocking_with_flexmock.rb +0 -26
  42. data/example_specs/failing/mocking_with_mocha.rb +0 -25
  43. data/example_specs/failing/mocking_with_rr.rb +0 -27
  44. data/example_specs/failing/partial_mock_example.rb +0 -20
  45. data/example_specs/failing/pending_example.rb +0 -9
  46. data/example_specs/failing/predicate_example.rb +0 -34
  47. data/example_specs/failing/raising_example.rb +0 -47
  48. data/example_specs/failing/spec_helper.rb +0 -1
  49. data/example_specs/failing/syntax_error_example.rb +0 -7
  50. data/example_specs/failing/team_spec.rb +0 -43
  51. data/example_specs/failing/timeout_behaviour.rb +0 -7
  52. data/example_specs/passing/custom_formatter.rb +0 -12
  53. data/example_specs/passing/custom_matchers.rb +0 -54
  54. data/example_specs/passing/dynamic_spec.rb +0 -9
  55. data/example_specs/passing/file_accessor.rb +0 -19
  56. data/example_specs/passing/file_accessor_spec.rb +0 -38
  57. data/example_specs/passing/filtered_formatter.rb +0 -18
  58. data/example_specs/passing/filtered_formatter_example.rb +0 -31
  59. data/example_specs/passing/greeter_spec.rb +0 -31
  60. data/example_specs/passing/helper_method_example.rb +0 -14
  61. data/example_specs/passing/implicit_docstrings_example.rb +0 -18
  62. data/example_specs/passing/io_processor.rb +0 -8
  63. data/example_specs/passing/io_processor_spec.rb +0 -21
  64. data/example_specs/passing/mocking_example.rb +0 -27
  65. data/example_specs/passing/multi_threaded_example_group_runner.rb +0 -26
  66. data/example_specs/passing/nested_classes_example.rb +0 -36
  67. data/example_specs/passing/options_example.rb +0 -31
  68. data/example_specs/passing/options_formatter.rb +0 -20
  69. data/example_specs/passing/partial_mock_example.rb +0 -29
  70. data/example_specs/passing/pending_example.rb +0 -20
  71. data/example_specs/passing/predicate_example.rb +0 -27
  72. data/example_specs/passing/shared_example_group_example.rb +0 -81
  73. data/example_specs/passing/shared_stack_examples.rb +0 -36
  74. data/example_specs/passing/spec_helper.rb +0 -1
  75. data/example_specs/passing/stack.rb +0 -36
  76. data/example_specs/passing/stack_spec.rb +0 -64
  77. data/example_specs/passing/stack_spec_with_nested_example_groups.rb +0 -67
  78. data/example_specs/passing/stubbing_example.rb +0 -69
  79. data/example_specs/passing/subject_example.rb +0 -45
  80. data/example_specs/passing/yielding_example.rb +0 -33
  81. data/example_specs/ruby1.9.compatibility/access_to_constants_spec.rb +0 -85
  82. data/example_specs/spec_helper.rb +0 -10
  83. 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
-