Skip to content

Instantly share code, notes, and snippets.

@alovak
Created May 27, 2011 09:48
Show Gist options
  • Save alovak/994962 to your computer and use it in GitHub Desktop.
Save alovak/994962 to your computer and use it in GitHub Desktop.
describe "Чайник" do
describe "Вода" do
context "при температуре равной или выше 100 С" do
before do
kettle.water.stub(:temperature).and_return(100)
end
it "должна кипеть" do
kettle.water.should be_boiling
end
end
context "при температуре ниже 100 С" do
before do
kettle.water.stub(:temperature).and_return(99)
end
it "не должна кипеть" do
kettle.water.should_not be_boiling
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment