Created
May 27, 2011 09:48
-
-
Save alovak/994962 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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