describe User do
it "finds users who have high ratings" do
high = User.new(:rating => 9,
:password => "test",
:password_confirmation => "test",
:username => "test", :email => "
[email protected]")
low = User.new(:rating => 8, :password => "test",
:password_confirmation => "test",
:username => "test", :email => "
[email protected]")
User.high_rating.should =~ [high]
end
end
Bad: Lots of noise
Saturday, November 3, 12