1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Can just test this inline

This commit is contained in:
Kasper Timm Hansen 2021-03-03 16:03:56 +01:00
parent 89a213b59d
commit 17854e69b3
No known key found for this signature in database
GPG key ID: 191153215EDA53D8

View file

@ -11,6 +11,7 @@ class ExcludingTest < ActiveRecord::TestCase
def test_result_set_does_not_include_single_excluded_record
assert_not_includes Post.excluding(@post).to_a, @post
assert_not_includes Post.without(@post).to_a, @post
end
def test_result_set_does_not_include_collection_of_excluded_records
@ -47,10 +48,6 @@ class ExcludingTest < ActiveRecord::TestCase
assert_equal "You must only pass a single or collection of Post objects to #excluding.", error.message
end
def test_result_set_does_not_include_without_record
assert_not_includes Post.without(@post).to_a, @post
end
private
def assert_no_excludes(relation)
assert_includes relation, @post