Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add feature with RSpec::TestCase and test_ methods

  • Loading branch information...
commit cea5d2f97f1e2a8a4982be7fd2a7ab38de511749 1 parent cd5bbec
David Chelimsky dchelimsky authored
Showing with 22 additions and 0 deletions.
  1. +22 −0 features/example_groups/classes_and_methods.feature
22 features/example_groups/classes_and_methods.feature
View
@@ -0,0 +1,22 @@
+Feature: define example groups with classes and methods
+
+ You can use familiar constructs like Ruby classes and methods if you prefer
+ them over the `describe`/`it` DSL.
+
+ Scenario: declare example group by subclassing RSpec::ExampleGroup
+ Given a file named "array_spec.rb" with:
+ """
+ class ArrayTest < RSpec::TestCase
+ def test_is_empty_when_created
+ assert Array.new.empty?
+ end
+ end
+ """
+ When I run `rspec array_spec.rb --format doc`
+ Then the output should contain:
+ """
+ Array
+ is_empty_when_created
+ """
+ And the examples should all pass
+
Please sign in to comment.
Something went wrong with that request. Please try again.