aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/fixtures_test.rb
diff options
context:
space:
mode:
authorDaniel Colson <danieljamescolson@gmail.com>2018-01-25 18:14:09 -0500
committerDaniel Colson <danieljamescolson@gmail.com>2018-01-25 23:32:59 -0500
commit94333a4c31bd10c1f358c538a167e6a4589bae2d (patch)
tree9106c349180bbdcba2e7839e0e79144e3a15a055 /activerecord/test/cases/fixtures_test.rb
parent211adb47e76b358ea15a3f756431c042ab231c23 (diff)
downloadrails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.gz
rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.tar.bz2
rails-94333a4c31bd10c1f358c538a167e6a4589bae2d.zip
Use assert_predicate and assert_not_predicate
Diffstat (limited to 'activerecord/test/cases/fixtures_test.rb')
-rw-r--r--activerecord/test/cases/fixtures_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index 34aaadcf7c..a3b160b423 100644
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -393,7 +393,7 @@ class FixturesTest < ActiveRecord::TestCase
nonexistent_fixture_path = FIXTURES_ROOT + "/imnothere"
# sanity check to make sure that this file never exists
- assert Dir[nonexistent_fixture_path + "*"].empty?
+ assert_predicate Dir[nonexistent_fixture_path + "*"], :empty?
assert_raise(Errno::ENOENT) do
ActiveRecord::FixtureSet.new(Account.connection, "companies", Company, nonexistent_fixture_path)
@@ -1143,10 +1143,10 @@ class FoxyFixturesTest < ActiveRecord::TestCase
end
def test_resolves_enums
- assert books(:awdr).published?
- assert books(:awdr).read?
- assert books(:rfr).proposed?
- assert books(:ddd).published?
+ assert_predicate books(:awdr), :published?
+ assert_predicate books(:awdr), :read?
+ assert_predicate books(:rfr), :proposed?
+ assert_predicate books(:ddd), :published?
end
end