From 1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 13 May 2018 11:26:10 +0900 Subject: Fix `CustomCops/AssertNot` to allow it to have failure message Follow up of #32605. --- railties/test/application/assets_test.rb | 2 +- railties/test/application/paths_test.rb | 2 +- railties/test/application/rake/migrations_test.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/test') diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 9ef123c5b6..4ca6d02b85 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -47,7 +47,7 @@ module ApplicationTests end def assert_no_file_exists(filename) - assert !File.exist?(filename), "#{filename} does exist" + assert_not File.exist?(filename), "#{filename} does exist" end test "assets routes have higher priority" do diff --git a/railties/test/application/paths_test.rb b/railties/test/application/paths_test.rb index 0abc5cc9aa..28a9206daa 100644 --- a/railties/test/application/paths_test.rb +++ b/railties/test/application/paths_test.rb @@ -37,7 +37,7 @@ module ApplicationTests end def assert_not_in_load_path(*path) - assert !$:.any? { |p| File.expand_path(p) == root(*path) }, "Load path includes '#{root(*path)}'. They are:\n-----\n #{$:.join("\n")}\n-----" + assert_not $:.any? { |p| File.expand_path(p) == root(*path) }, "Load path includes '#{root(*path)}'. They are:\n-----\n #{$:.join("\n")}\n-----" end test "booting up Rails yields a valid paths object" do diff --git a/railties/test/application/rake/migrations_test.rb b/railties/test/application/rake/migrations_test.rb index bf5b07afbd..47c5ac105a 100644 --- a/railties/test/application/rake/migrations_test.rb +++ b/railties/test/application/rake/migrations_test.rb @@ -417,7 +417,7 @@ module ApplicationTests version = output =~ %r{[^/]+db/migrate/(\d+)_create_authors\.rb} && $1 rails "db:migrate", "db:rollback", "db:forward", "db:migrate:up", "db:migrate:down", "VERSION=#{version}" - assert !File.exist?("db/schema.rb"), "should not dump schema when configured not to" + assert_not File.exist?("db/schema.rb"), "should not dump schema when configured not to" end add_to_config("config.active_record.dump_schema_after_migration = true") -- cgit v1.2.3