]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/gems/rspec-1.1.2/stories/example_groups/autogenerated_docstrings
added RSpec and RSpec on Rails
[rails.git] / vendor / gems / rspec-1.1.2 / stories / example_groups / autogenerated_docstrings
diff --git a/vendor/gems/rspec-1.1.2/stories/example_groups/autogenerated_docstrings b/vendor/gems/rspec-1.1.2/stories/example_groups/autogenerated_docstrings
new file mode 100644 (file)
index 0000000..b3ff689
--- /dev/null
@@ -0,0 +1,45 @@
+Story: autogenerated docstrings
+
+  As an RSpec user
+  I want examples to generate their own names
+  So that I can reduce duplication between example names and example code
+
+  Scenario: run passing examples with ruby
+    Given the file ../../examples/pure/autogenerated_docstrings_example.rb
+
+    When I run it with the ruby interpreter -fs
+
+    Then the stdout should match /should equal 5/
+    And the stdout should match /should be < 5/
+    And the stdout should match /should include "a"/
+    And the stdout should match /should respond to #size/
+
+  Scenario: run failing examples with ruby
+    Given the file ../../failing_examples/failing_autogenerated_docstrings_example.rb
+
+    When I run it with the ruby interpreter -fs
+
+    Then the stdout should match /should equal 2/
+    And the stdout should match /should be > 5/
+    And the stdout should match /should include "b"/
+    And the stdout should match /should not respond to #size/
+
+  Scenario: run passing examples with spec
+    Given the file ../../examples/pure/autogenerated_docstrings_example.rb
+
+    When I run it with the spec script -fs
+
+    Then the stdout should match /should equal 5/
+    And the stdout should match /should be < 5/
+    And the stdout should match /should include "a"/
+    And the stdout should match /should respond to #size/
+
+  Scenario: run failing examples with spec
+    Given the file ../../failing_examples/failing_autogenerated_docstrings_example.rb
+
+    When I run it with the spec script -fs
+
+    Then the stdout should match /should equal 2/
+    And the stdout should match /should be > 5/
+    And the stdout should match /should include "b"/
+    And the stdout should match /should not respond to #size/