Created
February 10, 2010 03:18
-
-
Save alexmchale/299990 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 "references" do | |
it "should handle complex transitions" do | |
@vegetable.foods.count.should == 0 | |
@fruit.foods.count.should == 0 | |
@onion.category.should be_nil | |
@vegetable.foods << @onion | |
@vegetable.foods.count.should == 1 | |
@vegetable.foods.first.should == @onion | |
@fruit.foods.count.should == 0 | |
@onion.category.should == @vegetable | |
@fruit.foods << @onion | |
@vegetable.foods.count.should == 0 | |
@fruit.foods.count.should == 1 | |
@fruit.foods.first.should == @onion | |
@onion.category.should == @fruit | |
@onion.category = nil | |
@vegetable.foods.count.should == 0 | |
@fruit.foods.count.should == 0 | |
@onion.category.should be_nil | |
@onion.category = @vegetable | |
@vegetable.foods.count.should == 1 | |
@vegetable.foods.first.should == @onion | |
@fruit.foods.count.should == 0 | |
@onion.category.should == @vegetable | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment