Permalink
Browse files

reorg cuke features

  • Loading branch information...
1 parent 8310b17 commit ea4dd96792235cc95a3668e03104c908a552cb74 @dchelimsky dchelimsky committed Dec 20, 2010
Showing with 65 additions and 14 deletions.
  1. +27 −0 features/.nav
  2. +26 −2 features/README.markdown
  3. 0 features/{matchers → built_in_matchers}/be.feature
  4. 0 features/{matchers → built_in_matchers}/be_within.feature
  5. +1 −1 features/{matchers → built_in_matchers}/equality.feature
  6. 0 features/{matchers → built_in_matchers}/exist.feature
  7. +1 −1 features/{matchers → built_in_matchers}/expect_change.feature
  8. +1 −1 features/{matchers → built_in_matchers}/expect_error.feature
  9. 0 features/{matchers → built_in_matchers}/have.feature
  10. 0 features/{matchers → built_in_matchers}/include.feature
  11. 0 features/{matchers → built_in_matchers}/match.feature
  12. +1 −1 features/{matchers → built_in_matchers}/operators.feature
  13. +1 −1 features/{matchers → built_in_matchers}/predicates.feature
  14. 0 features/{matchers → built_in_matchers}/respond_to.feature
  15. +1 −1 features/{matchers → built_in_matchers}/satisfy.feature
  16. +1 −1 features/{matchers → built_in_matchers}/throw_symbol.feature
  17. 0 features/{matchers → built_in_matchers}/types.feature
  18. +1 −1 features/{matchers → custom_matchers}/access_running_example.feature
  19. +1 −1 features/{matchers → custom_matchers}/define_diffable_matcher.feature
  20. +1 −1 features/{matchers → custom_matchers}/define_matcher.feature
  21. +1 −1 features/{matchers → custom_matchers}/define_matcher_outside_rspec.feature
  22. +1 −1 features/{matchers → custom_matchers}/define_matcher_with_fluent_interface.feature
  23. 0 features/{expectations → }/customized_message.feature
  24. 0 features/{expectations → }/diffing.feature
  25. 0 features/{expectations → }/implicit_docstrings.feature
View
@@ -0,0 +1,27 @@
+- customized_message.feature
+- diffing.feature
+- implicit_docstrings.feature
+- built_in_matchers:
+ - be.feature
+ - be_within.feature
+ - equality.feature
+ - exist.feature
+ - expect_change.feature
+ - expect_error.feature
+ - have.feature
+ - include.feature
+ - match.feature
+ - operators.feature
+ - predicates.feature
+ - respond_to.feature
+ - satisfy.feature
+ - throw_symbol.feature
+ - types.feature
+- custom_matchers:
+ - define_matcher.feature
+ - define_diffable_matcher.feature
+ - define_matcher_with_fluent_interface.feature
+ - access_running_example.feature
+ - define_matcher_outside_rspec.feature
+- test_frameworks:
+ - test_unit.feature
View
@@ -1,12 +1,36 @@
-rspec-expectations is used to set expectations in executable
-examples:
+rspec-expectations is used to set expectations in executable examples.
describe Account do
it "has a balance of zero when first created" do
Account.new.balance.should eq(Money.new(0))
end
end
+## should and should_not
+
+rspec-expectations adds `should` and `should_not` to every object. Each of
+these can accept a matcher and, in most cases, an optional custom failure
+message (see [customized
+message](/rspec/rspec-expectations/v/2-3/customized-message)).
+
+## Matchers
+
+A Matcher is any object that responds to the following methods:
+
+ matches?(actual)
+ failure_message_for_should
+
+These methods are also part of the matcher protocol, but are optional:
+
+ does_not_match?(actual)
+ failure_message_for_should_not
+ description
+
+RSpec ships with a number of [built-in
+matchers](/rspec/rspec-expectations/v/2-3/dir/built-in-matchers) and a DSL for
+writing your own [custom
+matchers](/rspec/rspec-expectations/v/2-3/dir/custom-matchers).
+
## Issues
The documentation for rspec-expectations is a work in progress. We'll be adding
@@ -1,4 +1,4 @@
-Feature: Equality matchers
+Feature: equality matchers
Ruby exposes several different methods for handling equality:
@@ -1,4 +1,4 @@
-Feature: Expect change
+Feature: expect change
Expect some code (wrapped in a proc) to change the state of some object.
@@ -1,4 +1,4 @@
-Feature: Expect error
+Feature: expect error
Expect a proc to raise an error when called.
@@ -1,4 +1,4 @@
-Feature: Operator matchers
+Feature: operator matchers
RSpec provides a number of matchers that are based on Ruby's built-in
operators. These pretty much work like you expect. For example, each of these
@@ -1,4 +1,4 @@
-Feature: Predicate matchers
+Feature: predicate matchers
Ruby objects commonly provide predicate methods:
@@ -1,4 +1,4 @@
-Feature: Satisfy matcher
+Feature: satisfy matcher
The satisfy matcher is extremely flexible and can handle almost anything
you want to specify. It passes if the block you provide returns true:
@@ -1,4 +1,4 @@
-Feature: Throw symbol matcher
+Feature: throw_symbol matcher
The throw_symbol matcher is used to specify that a block of code
throws a symbol. The most basic form passes if any symbol is thrown:
@@ -1,4 +1,4 @@
-Feature: Access running example
+Feature: access running example
In order to take advantage of services that are available
in my examples when I'm writing matchers
@@ -1,4 +1,4 @@
-Feature: Define diffable matcher
+Feature: define diffable matcher
When a matcher is defined as diffable, and the --diff
flag is set, the output will include a diff of the submitted
@@ -1,4 +1,4 @@
-Feature: Define matcher
+Feature: define matcher
In order to express my domain clearly in my code examples
As an RSpec user
@@ -1,4 +1,4 @@
-Feature: Define matcher outside rspec
+Feature: define matcher outside rspec
In order to express my domain clearly in my code examples
As a non-rspec user
@@ -1,4 +1,4 @@
-Feature: Define matcher with fluent interface
+Feature: define matcher with fluent interface
Use the chain() method to define matchers with a fluent interface.
File renamed without changes.

0 comments on commit ea4dd96

Please sign in to comment.