Skip to content
Browse files

Fix a bug in the associated microposts test

  • Loading branch information...
1 parent 903e1a2 commit f02407dd4cea753ca7ef17350ceb8360b8c90eef @mhartl mhartl committed Oct 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 spec/models/user_spec.rb
View
3 spec/models/user_spec.rb
@@ -159,8 +159,9 @@
end
it "should destroy associated microposts" do
- microposts = @user.microposts
+ microposts = @user.microposts.dup
@user.destroy
+ microposts.should_not be_empty
microposts.each do |micropost|
Micropost.find_by_id(micropost.id).should be_nil
end

0 comments on commit f02407d

Please sign in to comment.
Something went wrong with that request. Please try again.