Skip to content

Instantly share code, notes, and snippets.

@bionicpill
Created August 18, 2011 20:04
Show Gist options
  • Save bionicpill/1155036 to your computer and use it in GitHub Desktop.
Save bionicpill/1155036 to your computer and use it in GitHub Desktop.
describe Tour do
describe '#each' do
it "should be enumerable on it's request_showings" do
t = Factory(:tour)
3.times do
t.request_showings.create(:property => Factory(:property))
end
t.count.should be 3
t.request_showings.each do |e|
t.include?(e).should be_true
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment