test against AR class rather than the relation (thanks Andrew White!)
This commit is contained in:
parent
0471fc9f1c
commit
2be383b946
@ -209,9 +209,9 @@ def test_first_bang_missing
|
||||
end
|
||||
|
||||
def test_model_class_responds_to_first_bang
|
||||
assert_equal topics(:first), Topic.order(:id).first!
|
||||
assert Topic.first!
|
||||
Topic.delete_all
|
||||
assert_raises ActiveRecord::RecordNotFound do
|
||||
Topic.delete_all
|
||||
Topic.first!
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user