rspec-core 2.0.0.beta.8 → 2.0.0.beta.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/README.markdown +8 -8
  2. data/Rakefile +9 -9
  3. data/Upgrade.markdown +6 -6
  4. data/VERSION +1 -1
  5. data/cucumber.yml +2 -7
  6. data/example_specs/passing/subject_example.rb +45 -0
  7. data/example_specs/spec_helper.rb +1 -1
  8. data/features/command_line/line_number_appended_to_path.feature +11 -13
  9. data/features/command_line/line_number_option.feature +3 -3
  10. data/features/configuration/custom_options.feature +71 -0
  11. data/features/configuration/options_file.feature +13 -13
  12. data/features/example_groups/describe_aliases.feature +1 -1
  13. data/features/example_groups/nested_groups.feature +4 -5
  14. data/features/filtering/inclusion_filters.feature +74 -0
  15. data/features/formatters/custom_formatter.feature +1 -1
  16. data/features/hooks/around_hook.feature +1 -1
  17. data/features/hooks/before_and_after_hooks.feature +61 -33
  18. data/features/hooks/described_class.feature +1 -1
  19. data/features/hooks/halt.feature +2 -2
  20. data/features/mock_framework_integration/use_flexmock.feature +2 -2
  21. data/features/mock_framework_integration/use_mocha.feature +2 -2
  22. data/features/mock_framework_integration/use_rr.feature +2 -2
  23. data/features/mock_framework_integration/use_rspec.feature +2 -2
  24. data/features/pending/pending_examples.feature +5 -5
  25. data/features/subject/explicit_subject.feature +4 -4
  26. data/features/subject/implicit_subject.feature +2 -2
  27. data/features/support/env.rb +1 -1
  28. data/lib/autotest/rspec2.rb +1 -1
  29. data/lib/rspec/autorun.rb +1 -1
  30. data/lib/rspec/core.rb +16 -9
  31. data/lib/rspec/core/around_proxy.rb +1 -1
  32. data/lib/rspec/core/backward_compatibility.rb +29 -1
  33. data/lib/rspec/core/configuration.rb +24 -16
  34. data/lib/rspec/core/configuration_options.rb +2 -2
  35. data/lib/rspec/core/deprecation.rb +3 -3
  36. data/lib/rspec/core/errors.rb +1 -1
  37. data/lib/rspec/core/example.rb +10 -3
  38. data/lib/rspec/core/example_group.rb +83 -58
  39. data/lib/rspec/core/formatters.rb +1 -1
  40. data/lib/rspec/core/formatters/base_formatter.rb +4 -4
  41. data/lib/rspec/core/formatters/base_text_formatter.rb +3 -3
  42. data/lib/rspec/core/formatters/documentation_formatter.rb +6 -9
  43. data/lib/rspec/core/formatters/helpers.rb +5 -4
  44. data/lib/rspec/core/formatters/progress_formatter.rb +1 -1
  45. data/lib/rspec/core/hooks.rb +1 -1
  46. data/lib/rspec/core/kernel_extensions.rb +3 -23
  47. data/lib/rspec/core/let.rb +73 -5
  48. data/lib/rspec/core/load_path.rb +1 -1
  49. data/lib/rspec/core/metadata.rb +20 -8
  50. data/lib/rspec/core/mocking/with_absolutely_nothing.rb +1 -1
  51. data/lib/rspec/core/mocking/with_flexmock.rb +1 -1
  52. data/lib/rspec/core/mocking/with_mocha.rb +1 -1
  53. data/lib/rspec/core/mocking/with_rr.rb +2 -2
  54. data/lib/rspec/core/mocking/with_rspec.rb +3 -3
  55. data/lib/rspec/core/object_extensions.rb +15 -0
  56. data/lib/rspec/core/pending.rb +2 -2
  57. data/lib/rspec/core/rake_task.rb +2 -2
  58. data/lib/rspec/core/ruby_project.rb +1 -1
  59. data/lib/rspec/core/runner.rb +13 -8
  60. data/lib/rspec/core/shared_example_group.rb +16 -6
  61. data/lib/rspec/core/subject.rb +23 -7
  62. data/lib/rspec/core/version.rb +1 -1
  63. data/lib/rspec/core/world.rb +45 -38
  64. data/rspec-core.gemspec +17 -11
  65. data/spec/autotest/failed_results_re_spec.rb +1 -1
  66. data/spec/rspec/core/configuration_options_spec.rb +17 -7
  67. data/spec/rspec/core/configuration_spec.rb +46 -18
  68. data/spec/rspec/core/deprecations_spec.rb +8 -0
  69. data/spec/rspec/core/example_group_spec.rb +194 -56
  70. data/spec/rspec/core/example_spec.rb +18 -6
  71. data/spec/rspec/core/formatters/base_formatter_spec.rb +2 -2
  72. data/spec/rspec/core/formatters/base_text_formatter_spec.rb +18 -2
  73. data/spec/rspec/core/formatters/documentation_formatter_spec.rb +29 -4
  74. data/spec/rspec/core/formatters/helpers_spec.rb +18 -11
  75. data/spec/rspec/core/formatters/progress_formatter_spec.rb +2 -2
  76. data/spec/rspec/core/kernel_extensions_spec.rb +5 -9
  77. data/spec/rspec/core/metadata_spec.rb +29 -8
  78. data/spec/rspec/core/pending_example_spec.rb +7 -7
  79. data/spec/rspec/core/ruby_project_spec.rb +1 -1
  80. data/spec/rspec/core/runner_spec.rb +9 -9
  81. data/spec/rspec/core/shared_example_group_spec.rb +3 -3
  82. data/spec/rspec/core/subject_spec.rb +1 -1
  83. data/spec/rspec/core/world_spec.rb +16 -35
  84. data/spec/rspec/core_spec.rb +9 -9
  85. data/spec/spec_helper.rb +11 -13
  86. data/spec/support/matchers.rb +2 -2
  87. data/specs.watchr +11 -11
  88. metadata +16 -10
@@ -1,14 +1,14 @@
1
- # Rspec Core
1
+ # RSpec Core
2
2
 
3
- Rspec is an automated testing framework for Ruby, designed for use in Behaviour
4
- Driven Development and Test Driven Development.
3
+ Behaviour Driven Development for Ruby
5
4
 
6
- rspec-core includes the Rspec runner, output formatters, and the `rspec`
7
- command.
5
+ ## Upgrading from rspec-1.x
6
+
7
+ See Upgrade.markdown
8
8
 
9
9
  ## Install
10
10
 
11
- [sudo] gem install rspec --prerelease
11
+ gem install rspec --prerelease
12
12
 
13
13
  This will install the rspec, rspec-core, rspec-expectations and rspec-mocks
14
14
  gems.
@@ -16,7 +16,7 @@ gems.
16
16
  ## Get Started
17
17
 
18
18
  Start with a simple example of behavior you expect from your system. Do
19
- this before you write any code:
19
+ this before you write any implementation code:
20
20
 
21
21
  # in spec/calculator_spec.rb
22
22
  describe Calculator, "add" do
@@ -42,7 +42,7 @@ Implement the simplest solution:
42
42
  Be sure to require the implementation file in the spec:
43
43
 
44
44
  # in spec/calculator_spec.rb
45
- # - Rspec adds ./lib to the $LOAD_PATH, so you can
45
+ # - RSpec adds ./lib to the $LOAD_PATH, so you can
46
46
  # just require "calculator" directly
47
47
  require "calculator"
48
48
 
data/Rakefile CHANGED
@@ -13,15 +13,15 @@ begin
13
13
  require 'jeweler'
14
14
  Jeweler::Tasks.new do |gem|
15
15
  gem.name = "rspec-core"
16
- gem.version = Rspec::Core::Version::STRING
17
- gem.summary = "rspec-core-#{Rspec::Core::Version::STRING}"
18
- gem.description = 'Rspec runner and example group classes'
16
+ gem.version = RSpec::Core::Version::STRING
17
+ gem.summary = "rspec-core-#{RSpec::Core::Version::STRING}"
18
+ gem.description = 'RSpec runner and example group classes'
19
19
  gem.email = "dchelimsky@gmail.com;chad.humphries@gmail.com"
20
20
  gem.homepage = "http://github.com/rspec/core"
21
21
  gem.authors = ["Chad Humphries", "David Chelimsky"]
22
22
  gem.rubyforge_project = "rspec"
23
- gem.add_development_dependency "rspec-expectations", ">= #{Rspec::Core::Version::STRING}"
24
- gem.add_development_dependency "rspec-mocks", ">= #{Rspec::Core::Version::STRING}"
23
+ gem.add_development_dependency "rspec-expectations", ">= #{RSpec::Core::Version::STRING}"
24
+ gem.add_development_dependency "rspec-mocks", ">= #{RSpec::Core::Version::STRING}"
25
25
  gem.add_development_dependency('cucumber', '>= 0.5.3')
26
26
  gem.add_development_dependency('autotest', '>= 4.2.9')
27
27
  gem.post_install_message = <<-EOM
@@ -43,14 +43,14 @@ end
43
43
  namespace :gem do
44
44
  desc "push to gemcutter"
45
45
  task :push => :build do
46
- system "gem push pkg/rspec-core-#{Rspec::Core::Version::STRING}.gem"
46
+ system "gem push pkg/rspec-core-#{RSpec::Core::Version::STRING}.gem"
47
47
  end
48
48
  end
49
49
 
50
- Rspec::Core::RakeTask.new(:spec)
50
+ RSpec::Core::RakeTask.new(:spec)
51
51
 
52
52
  desc "Run all examples using rcov"
53
- Rspec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t|
53
+ RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t|
54
54
  t.rcov = true
55
55
  t.rcov_opts = %[-Ilib -Ispec --exclude "mocks,expectations,gems/*,spec/resources,spec/lib,spec/spec_helper.rb,db/*,/Library/Ruby/*,config/*"]
56
56
  t.rcov_opts << %[--no-html --aggregate coverage.data]
@@ -85,7 +85,7 @@ end
85
85
 
86
86
  Rake::RDocTask.new do |rdoc|
87
87
  rdoc.rdoc_dir = 'rdoc'
88
- rdoc.title = "rspec-core #{Rspec::Core::Version::STRING}"
88
+ rdoc.title = "rspec-core #{RSpec::Core::Version::STRING}"
89
89
  rdoc.rdoc_files.include('README*')
90
90
  rdoc.rdoc_files.include('lib/**/*.rb')
91
91
  end
@@ -2,16 +2,16 @@
2
2
 
3
3
  ## What's changed
4
4
 
5
- ### Rspec namespace
5
+ ### RSpec namespace
6
6
 
7
- The root namespace is now `Rspec` instead of `Spec`, and the root directory
7
+ The root namespace is now `RSpec` instead of `Spec`, and the root directory
8
8
  under `lib` is `rspec` instead of `spec`.
9
9
 
10
10
  ### Configuration
11
11
 
12
12
  Typically in `spec/spec_helper.rb`, configuration is now done like this:
13
13
 
14
- Rspec.configure do |c|
14
+ RSpec.configure do |c|
15
15
  # ....
16
16
  end
17
17
 
@@ -38,7 +38,7 @@ each example in a variety of ways.
38
38
  The most obvious use is for filtering the run. For example:
39
39
 
40
40
  # in spec/spec_helper.rb
41
- Rspec.configure do |c|
41
+ RSpec.configure do |c|
42
42
  c.filter_run :focus => true
43
43
  end
44
44
 
@@ -54,7 +54,7 @@ When you run the `rspec` command, rspec will run only the examples that have
54
54
 
55
55
  You can also add `run_all_when_everything_filtered` to the config:
56
56
 
57
- Rspec.configure do |c|
57
+ RSpec.configure do |c|
58
58
  c.filter_run :focus => true
59
59
  c.run_all_when_everything_filtered = true
60
60
  end
@@ -72,7 +72,7 @@ rspec-core, and here's how we're getting the right stuff to run under the
72
72
  right version:
73
73
 
74
74
  # in spec/spec_helper.rb
75
- Rspec.configure do |c|
75
+ RSpec.configure do |c|
76
76
  c.exclusion_filter = { :ruby => lambda {|version|
77
77
  !(RUBY_VERSION.to_s =~ /^#{version.to_s}/)
78
78
  }}
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.beta.8
1
+ 2.0.0.beta.9
@@ -1,7 +1,2 @@
1
- <%
2
- rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
- rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4
- std_opts = "#{rerun_opts} --require features --format rerun --out rerun.txt --strict --tags ~@wip"
5
- %>
6
- default: <%= std_opts %>
7
- wip: --require features --tags @wip:3 --wip features
1
+ default: --require features --strict --format progress --tags ~@wip features
2
+ wip: --require features --tags @wip:3 --wip features
@@ -0,0 +1,45 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ module SubjectExample
4
+ class OneThing
5
+ attr_accessor :what_things_do
6
+ def initialize
7
+ self.what_things_do = "stuff"
8
+ end
9
+ end
10
+
11
+ # implicit subject
12
+ describe OneThing do
13
+ it "should do what things do" do
14
+ subject.what_things_do.should == "stuff"
15
+ end
16
+ it "should be a OneThing" do
17
+ should == subject
18
+ end
19
+ its(:what_things_do) { should == "stuff" }
20
+ end
21
+
22
+ # explicit subject
23
+ describe SubjectExample::OneThing do
24
+ subject { SubjectExample::OneThing.new }
25
+ it "should do what things do" do
26
+ subject.what_things_do.should == "stuff"
27
+ end
28
+ it "should be a OneThing" do
29
+ should == subject
30
+ end
31
+ its(:what_things_do) { should == "stuff" }
32
+ end
33
+
34
+ # modified subject
35
+ describe OneThing do
36
+ subject { SubjectExample::OneThing.new }
37
+ before { subject.what_things_do = "more stuff" }
38
+ it "should do what things do" do
39
+ subject.what_things_do.should == "more stuff"
40
+ end
41
+ its(:what_things_do) { should == "more stuff" }
42
+ end
43
+
44
+ end
45
+
@@ -4,7 +4,7 @@ $LOAD_PATH << File.expand_path('../../../rspec-mocks/lib', __FILE__)
4
4
  require 'rspec/expectations'
5
5
  require 'rspec/core'
6
6
 
7
- Rspec.configure do |c|
7
+ RSpec.configure do |c|
8
8
  c.mock_with :rspec
9
9
  end
10
10
 
@@ -28,80 +28,78 @@ Feature: line number appended to file path
28
28
  end
29
29
  """
30
30
 
31
- @wip
32
31
  Scenario: nested groups - outer group on declaration line
33
- When I run "rspec example_spec.rb:1 --format doc"
32
+ When I run "rspec ./example_spec.rb:1 --format doc"
34
33
  Then I should see "3 examples, 0 failures"
35
34
  And I should see "second example in outer group"
36
35
  And I should see "first example in outer group"
37
36
  And I should see "example in nested group"
38
37
 
39
- @wip
40
38
  Scenario: nested groups - outer group inside block before example
41
- When I run "rspec example_spec.rb:2 --format doc"
39
+ When I run "rspec ./example_spec.rb:2 --format doc"
42
40
  Then I should see "3 examples, 0 failures"
43
41
  And I should see "second example in outer group"
44
42
  And I should see "first example in outer group"
45
43
  And I should see "example in nested group"
46
44
 
47
45
  Scenario: nested groups - inner group on declaration line
48
- When I run "rspec example_spec.rb:11 --format doc"
46
+ When I run "rspec ./example_spec.rb:11 --format doc"
49
47
  Then I should see "1 example, 0 failures"
50
48
  And I should see "example in nested group"
51
49
  And I should not see "second example in outer group"
52
50
  And I should not see "first example in outer group"
53
51
 
54
52
  Scenario: nested groups - inner group inside block before example
55
- When I run "rspec example_spec.rb:12 --format doc"
53
+ When I run "rspec ./example_spec.rb:12 --format doc"
56
54
  Then I should see "1 example, 0 failures"
57
55
  And I should see "example in nested group"
58
56
  And I should not see "second example in outer group"
59
57
  And I should not see "first example in outer group"
60
58
 
61
59
  Scenario: two examples - first example on declaration line
62
- When I run "rspec example_spec.rb:3 --format doc"
60
+ When I run "rspec ./example_spec.rb:3 --format doc"
63
61
  Then I should see "1 example, 0 failures"
64
62
  And I should see "first example in outer group"
65
63
  But I should not see "second example in outer group"
66
64
  And I should not see "example in nested group"
67
65
 
68
66
  Scenario: two examples - first example inside block
69
- When I run "rspec example_spec.rb:4 --format doc"
67
+ When I run "rspec ./example_spec.rb:4 --format doc"
70
68
  Then I should see "1 example, 0 failures"
71
69
  And I should see "first example in outer group"
72
70
  But I should not see "second example in outer group"
73
71
  And I should not see "example in nested group"
74
72
 
75
73
  Scenario: two examples - first example on end
76
- When I run "rspec example_spec.rb:5 --format doc"
74
+ When I run "rspec ./example_spec.rb:5 --format doc"
77
75
  Then I should see "1 example, 0 failures"
78
76
  And I should see "first example in outer group"
79
77
  But I should not see "second example in outer group"
80
78
  And I should not see "example in nested group"
81
79
 
82
80
  Scenario: two examples - first example after end but before next example
83
- When I run "rspec example_spec.rb:6 --format doc"
81
+ When I run "rspec ./example_spec.rb:6 --format doc"
84
82
  Then I should see "1 example, 0 failures"
85
83
  And I should see "first example in outer group"
86
84
  But I should not see "second example in outer group"
87
85
  And I should not see "example in nested group"
88
86
 
89
87
  Scenario: two examples - second example on declaration line
90
- When I run "rspec example_spec.rb:7 --format doc"
88
+ When I run "rspec ./example_spec.rb:7 --format doc"
91
89
  Then I should see "1 example, 0 failures"
92
90
  And I should see "second example in outer group"
93
91
  But I should not see "first example in outer group"
94
92
  And I should not see "example in nested group"
95
93
 
96
94
  Scenario: two examples - second example inside block
97
- When I run "rspec example_spec.rb:7 --format doc"
95
+ When I run "rspec ./example_spec.rb:7 --format doc"
98
96
  Then I should see "1 example, 0 failures"
99
97
  And I should see "second example in outer group"
100
98
  But I should not see "first example in outer group"
101
99
  And I should not see "example in nested group"
102
100
 
103
101
  Scenario: two examples - second example on end
104
- When I run "rspec example_spec.rb:7 --format doc"
102
+ When I run "rspec ./example_spec.rb:7 --format doc"
105
103
  Then I should see "1 example, 0 failures"
106
104
  And I should see "second example in outer group"
107
105
  But I should not see "first example in outer group"
@@ -1,6 +1,6 @@
1
1
  Feature: line number option
2
2
 
3
- As an Rspec user
3
+ As an RSpec user
4
4
  I want to run one example identified by the line number
5
5
 
6
6
  Scenario: standard examples
@@ -20,7 +20,7 @@ Feature: line number option
20
20
 
21
21
  end
22
22
  """
23
- When I run "rspec example_spec.rb --line 5 --format doc"
23
+ When I run "rspec ./example_spec.rb --line 5 --format doc"
24
24
  Then I should see "1 example, 0 failures"
25
25
  Then I should see "should be > 8"
26
26
  But the stdout should not contain "should be < 10"
@@ -38,7 +38,7 @@ Feature: line number option
38
38
 
39
39
  end
40
40
  """
41
- When I run "rspec example_spec.rb --line 5 --format doc"
41
+ When I run "rspec ./example_spec.rb --line 5 --format doc"
42
42
  Then I should see "1 example, 0 failures"
43
43
  Then I should see "should be > 8"
44
44
  But the stdout should not contain "should be < 10"
@@ -0,0 +1,71 @@
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
+
@@ -5,22 +5,22 @@ Feature: spec/spec.opts
5
5
  automatically.
6
6
 
7
7
  Options declared in spec/spec.opts will override configuration
8
- set up in Rspec.configure blocks.
8
+ set up in RSpec.configure blocks.
9
9
 
10
- Scenario: color set in Rspec.configure
10
+ Scenario: color set in RSpec.configure
11
11
  Given a file named "spec/example_spec.rb" with:
12
12
  """
13
- Rspec.configure {|c| c.color_enabled = true }
13
+ RSpec.configure {|c| c.color_enabled = true }
14
14
 
15
15
  describe "color_enabled" do
16
- context "when set with Rspec.configure" do
16
+ context "when set with RSpec.configure" do
17
17
  it "is true" do
18
- Rspec.configuration.color_enabled?.should be_true
18
+ RSpec.configuration.color_enabled?.should be_true
19
19
  end
20
20
  end
21
21
  end
22
22
  """
23
- When I run "rspec spec/example_spec.rb"
23
+ When I run "rspec ./spec/example_spec.rb"
24
24
  Then I should see "1 example, 0 failures"
25
25
 
26
26
  Scenario: color set in .rspec
@@ -31,14 +31,14 @@ Feature: spec/spec.opts
31
31
  And a file named "spec/example_spec.rb" with:
32
32
  """
33
33
  describe "color_enabled" do
34
- context "when set with Rspec.configure" do
34
+ context "when set with RSpec.configure" do
35
35
  it "is true" do
36
- Rspec.configuration.color_enabled?.should be_true
36
+ RSpec.configuration.color_enabled?.should be_true
37
37
  end
38
38
  end
39
39
  end
40
40
  """
41
- When I run "rspec spec/example_spec.rb"
41
+ When I run "rspec ./spec/example_spec.rb"
42
42
  Then I should see "1 example, 0 failures"
43
43
 
44
44
  @wip
@@ -49,20 +49,20 @@ Feature: spec/spec.opts
49
49
  """
50
50
  And a file named "spec/spec_helper.rb" with:
51
51
  """
52
- Rspec.configure {|c| c.formatter = 'progress'}
52
+ RSpec.configure {|c| c.formatter = 'progress'}
53
53
  """
54
54
  And a file named "spec/example_spec.rb" with:
55
55
  """
56
56
  require "spec_helper"
57
57
 
58
58
  describe "formatter" do
59
- context "when set with Rspec.configure and in spec.opts" do
59
+ context "when set with RSpec.configure and in spec.opts" do
60
60
  it "takes the value set in spec.opts" do
61
- Rspec.configuration.formatter.should be_an(Rspec::Core::Formatters::DocumentationFormatter)
61
+ RSpec.configuration.formatter.should be_an(RSpec::Core::Formatters::DocumentationFormatter)
62
62
  end
63
63
  end
64
64
  end
65
65
  """
66
- When I run "rspec spec/example_spec.rb"
66
+ When I run "rspec ./spec/example_spec.rb"
67
67
  Then I should see "1 example, 0 failures"
68
68