Sha256: 55cd59f7316b937466cf82204db047cecd270427461eeda351d7b543a9c72547

Contents?: true

Size: 1.45 KB

Versions: 15

Compression:

Stored size: 1.45 KB

Contents

= RSpec

* http://rspec.info
* http://rubyforge.org/projects/rspec
* http://github.com/dchelimsky/rspec/wikis
* mailto:rspec-devel@rubyforge.org

== DESCRIPTION:

RSpec is a Behaviour Driven Development framework for writing executable code
examples.

== FEATURES:

* Spec::Example provides a framework for expressing executable code examples
* Spec::Expectations adds #should and #should_not to every object
* Spec::Matchers provides Expression Matchers for use with #should and #should_not
* Spec::Mocks is a full featured mocking/stubbing library

== SYNOPSIS:

  describe Account do
    context "transfering money" do
      it "deposits transfer amount to the other account" do
        source = Account.new(50, :USD)
        target = mock('target account')
        target.should_receive(:deposit).with(Money.new(5, :USD))
        source.transfer(5, :USD).to(target)
      end

      it "reduces its balance by the transfer amount" do
        source = Account.new(50, :USD)
        target = stub('target account')
        source.transfer(5, :USD).to(target)
        source.balance.should == Money.new(45, :USD)
      end
    end
  end
  
  $ spec spec/account_spec.rb --format nested
  Account
    transfering money
      deposits transfer amount to the other account
      reduces its balance by the transfer amount
    
  2 examples, 0 failures

== INSTALL:

  [sudo] gem install rspec

 or

  git clone git://github.com/dchelimsky/rspec.git
  cd rspec
  rake gem
  rake install_gem

Version data entries

15 entries across 15 versions & 5 rubygems

Version Path
dchelimsky-rspec-1.1.11.2 README.txt
dchelimsky-rspec-1.1.11.3 README.txt
dchelimsky-rspec-1.1.11.4 README.txt
dchelimsky-rspec-1.1.11.5 README.txt
dchelimsky-rspec-1.1.11.6 README.txt
dchelimsky-rspec-1.1.11.7 README.txt
dchelimsky-rspec-1.1.12 README.txt
newbamboo-evented-rspec-1.1.12 README.txt
newbamboo-rspec-1.1.12 README.txt
rspec-1.1.12 README.txt
spree-0.6.0 vendor/plugins/rspec/README.txt
spree-0.7.0 vendor/plugins/rspec/README.txt
spree-0.7.1 vendor/plugins/rspec/README.txt
spree-0.8.0 vendor/plugins/rspec/README.txt
spree-0.8.1 vendor/plugins/rspec/README.txt