diff options
Diffstat (limited to 'vendor/gems/rspec-1.3.1/features/spec_helper')
-rw-r--r-- | vendor/gems/rspec-1.3.1/features/spec_helper/spec_helper.feature | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/gems/rspec-1.3.1/features/spec_helper/spec_helper.feature b/vendor/gems/rspec-1.3.1/features/spec_helper/spec_helper.feature new file mode 100644 index 000000000..2711e1a58 --- /dev/null +++ b/vendor/gems/rspec-1.3.1/features/spec_helper/spec_helper.feature @@ -0,0 +1,25 @@ +Feature: spec helper + In order to centralize code needed across most specs + As a spec author + I want to require 'spec_helper' + + Because rspec adds the PROJECT_ROOT/spec directory to the load path, we can + just require 'spec_helper' and it will be found. + + Scenario: spec helper + Given a directory named "spec" + And a file named "spec/spec_helper.rb" with: + """ + SOME_CONSTANT = 'some value' + """ + And a file named "example.rb" with: + """ + require 'spec_helper' + describe SOME_CONSTANT do + it { should == 'some value' } + end + """ + When I run "spec example.rb" + And the stdout should include "1 example, 0 failures" + And the exit code should be 0 + |