Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

words

  • Loading branch information...
commit b342ebf7dc388feda755c2321891fb4375e1f977 1 parent 1f3e0f7
@dchelimsky dchelimsky authored
Showing with 27 additions and 9 deletions.
  1. +26 −8 features/README.markdown
  2. +1 −1  features/configuration.feature
View
34 features/README.markdown
@@ -1,12 +1,30 @@
-# Cucumber features
+rspec-mocks is used to create dynamic "doubles", which stand in for real
+objects in examples. You can set message expectations on them (i.e. mock
+methods), and/or stub return values for arbitrary messages:
-RSpec is specified using both RSpec and
-[Cucumber](http://github.com/aslakhellesoy/cucumber). Cucumber provides
-_executable documentation_. This means that the _.feature_ files below this
-directory serve as specification, documentation _and_ regression tests of the
-behaviour.
+ describe Account do
+ context "when closed" do
+ it "logs an account closed message" do
+ logger = double()
+ account = Account.new
+ account.logger = logger
+
+ logger.should_receive(:account_closed).with(account)
+
+ account.close
+ end
+ end
+ end
+
+Message expectations like the one in the example above are verified at
+the end of each example.
## Issues
-If you find this documentation incomplete or confusing, please [submit an
-issue](http://github.com/rspec/rspec-mocks/issues).
+The documentation for rspec-mocks is a work in progress. We'll be adding
+Cucumber features over time, and clarifying existing ones. If you have
+specific features you'd like to see added, find the existing documentation
+incomplete or confusing, or, better yet, wish to write a missing Cucumber
+feature yourself, please [submit an
+issue](http://github.com/rspec/rspec-mocks/issues) or a [pull
+request](http://github.com/rspec/rspec-mocks).
View
2  features/configuration.feature
@@ -1,4 +1,4 @@
-Feature: configure a test frawework to use rspec-mocks
+Feature: configure a test framework to use rspec-mocks
Test frameworks that want to use rspec-mocks can use
RSpec::Mocks::setup(self) to hook into rspec-mocks. Doing so adds the
Please sign in to comment.
Something went wrong with that request. Please try again.