Skip to content

Commit

Permalink
Improved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Mar 12, 2024
1 parent 8fef662 commit 501bef5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions test/migrations/misc.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
class ExecuteArbitrarySQL < TestMigration
def up
def change
execute 'SELECT CURRENT_TIMESTAMP'
end

def down
end
end

class RenameColumn < TestMigration
Expand Down
4 changes: 2 additions & 2 deletions test/multiple_databases_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_ignored_databases
assert_unsafe ExecuteArbitrarySQL
end
with_database(:animals) do
assert_safe ExecuteArbitrarySQL
assert_safe ExecuteArbitrarySQL, direction: :up
end
end
end
Expand All @@ -58,7 +58,7 @@ def test_ignored_databases_unsupported

with_ignored_databases([:animals]) do
error = assert_raises(StrongMigrations::Error) do
assert_safe ExecuteArbitrarySQL
assert_safe ExecuteArbitrarySQL, direction: :up
end
assert_equal "StrongMigrations.ignored_databases is not supported for Active Record < 6.1", error.message
end
Expand Down

0 comments on commit 501bef5

Please sign in to comment.