Skip to content

Instantly share code, notes, and snippets.

@foogoof
Created October 16, 2010 05:56
Show Gist options
  • Save foogoof/629496 to your computer and use it in GitHub Desktop.
Save foogoof/629496 to your computer and use it in GitHub Desktop.
Code sample written for a 5 minute talk on RSpec
describe "NIC-U" do
context "Fall conference" do
it "should be readable" do
"readable".should == "readable"
end
it { "readable".should == "readable"}
context "readable" do
it { should == "readable" }
end
context "rspec" do
class String
def readable?
"rspec" == to_s
end
end
it { should be_readable }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment