github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

dchelimsky / rspec

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1,439
    • 141
  • Source
  • Commits
  • Network (141)
  • Downloads (38)
  • Wiki (27)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (4)
    • 1.1-maintenance
    • experimental
    • master ✓
    • require-rubygems
  • Tags (38)
    • 1.3.0
    • 1.2.9.rc1
    • 1.2.9
    • 1.2.8
    • 1.2.7.rc1
    • 1.2.7
    • 1.2.6.99
    • 1.2.6
    • 1.2.5
    • 1.2.4
    • 1.2.3
    • 1.2.2.1
    • 1.2.2
    • 1.2.1
    • 1.2.0
    • 1.1.99.16
    • 1.1.99.15
    • 1.1.99.14
    • 1.1.99.13
    • 1.1.99.12
    • 1.1.99.11
    • 1.1.99.10
    • 1.1.99.9
    • 1.1.99.6
    • 1.1.99.5
    • 1.1.99.4
    • 1.1.99.3
    • 1.1.99.2
    • 1.1.99.1
    • 1.1.12
    • 1.1.11
    • 1.1.10
    • 1.1.9
    • 1.1.8
    • 1.1.7
    • 1.1.6
    • 1.1.5
    • 1.1.4
Sending Request…
Click here to lend your support to: rspec and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Behaviour Driven Development framework for Ruby — Read more

  cancel

http://rspec.info

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

words 
dchelimsky (author)
Mon Feb 08 21:22:36 -0800 2010
commit  10e3836465effea19487788f627bffa096f4dc11
tree    21106a329b39d43cd383b8c72395d2c2823b3076
parent  2753b492e00078c92f9fe3b9e879ea83e3536753
rspec /
name age
history
message
file .autotest Sat Mar 07 09:01:49 -0800 2009 remove autotest/growl (for the moment - figure ... [dchelimsky]
file .document Sun Mar 22 15:21:14 -0700 2009 README => rdoc [dchelimsky]
file .gitignore Fri Oct 30 10:37:46 -0700 2009 ignore tags [dchelimsky]
file History.rdoc Mon Feb 08 21:22:36 -0800 2010 words [dchelimsky]
file License.txt Mon Jan 11 17:49:35 -0800 2010 prep for 1.3.0 [dchelimsky]
file Manifest.txt Mon Jan 11 17:49:35 -0800 2010 prep for 1.3.0 [dchelimsky]
file README.rdoc Mon Jan 11 17:49:35 -0800 2010 prep for 1.3.0 [dchelimsky]
file Rakefile Thu Dec 03 05:29:40 -0800 2009 make Rakefile work without cucumber installed ... [devrandom]
file Ruby1.9.rdoc Mon Sep 14 02:26:36 -0700 2009 words [dchelimsky]
file TODO.txt Sat Mar 21 07:13:45 -0700 2009 words [dchelimsky]
file Upgrade.rdoc Mon Jan 11 17:49:35 -0800 2010 prep for 1.3.0 [dchelimsky]
directory bin/ Sun Sep 13 19:24:11 -0700 2009 reinstate loading rspec lib dir from bin/spec [dchelimsky]
file cucumber.yml Sat Oct 03 08:42:16 -0700 2009 prepend tags with @ for new cucumber [dchelimsky]
directory examples/ Thu Aug 20 02:30:16 -0700 2009 trust the load path (more to do, but good start) [dchelimsky]
directory features-pending/ Wed Jul 29 05:44:01 -0700 2009 temporarily moved heckle feature to features-pe... [dchelimsky]
directory features/ Tue Jan 05 18:32:56 -0800 2010 Merge branch 'LH_912' * LH_912: Rename globa... [dchelimsky]
file geminstaller.yml Mon Nov 23 15:43:07 -0800 2009 switch to fakefs [dchelimsky]
file init.rb Thu Apr 03 15:02:31 -0700 2008 remove everything but rspec (core) from main rs... [dchelimsky]
directory lib/ Mon Feb 08 21:19:27 -0800 2010 Fix delegation of stubbed values on superclass ... [Scott Taylor]
directory resources/ Thu Aug 20 02:30:16 -0700 2009 trust the load path (more to do, but good start) [dchelimsky]
directory spec/ Fri Feb 05 08:20:07 -0800 2010 Fix delegation of stubbed values on superclass ... [Scott Taylor]
README.rdoc

RSpec

  • rspec.info
  • rubyforge.org/projects/rspec
  • github.com/dchelimsky/rspec/wikis
  • rspec-users@rubyforge.org
  • rspec-devel@rubyforge.org

DESCRIPTION:

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

FEATURES:

  • Spec::Example provides a framework for organizing 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 mock object/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

See wiki.github.com/dchelimsky/rspec if you want to clone/build/install.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server