aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gems/rspec-1.3.1/features/spec_helper
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2011-02-24 15:10:14 +0000
committerLouise Crow <louise.crow@gmail.com>2011-02-24 15:10:14 +0000
commit08a64f9e3139851fd65c7ba6969ee590b4afea6a (patch)
tree20c77e796002dfa95b2af3ba00ebd2f691c02fc7 /vendor/gems/rspec-1.3.1/features/spec_helper
parent3757bb52c0aa86b779b00428d7ebe35b30cea1ee (diff)
Adding rspec gem.
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.feature25
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
+