aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-05-13 11:26:10 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-05-13 11:32:47 +0900
commit1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42 (patch)
tree3bb51baa159489c0ba9632d09f7f926ec3bc4147 /railties/test
parent10b6c65dbcb0731c5bee815dc01f84a30983a871 (diff)
downloadrails-1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42.tar.gz
rails-1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42.tar.bz2
rails-1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42.zip
Fix `CustomCops/AssertNot` to allow it to have failure message
Follow up of #32605.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/assets_test.rb2
-rw-r--r--railties/test/application/paths_test.rb2
-rw-r--r--railties/test/application/rake/migrations_test.rb2
3 files changed, 3 insertions, 3 deletions
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")