spec/features/triggers/revert_spec.rb in fx-0.8.0 vs spec/features/triggers/revert_spec.rb in fx-0.9.0

- old
+ new

@@ -1,26 +1,26 @@ require "spec_helper" -describe "Reverting migrations", :db do +RSpec.describe "Reverting migrations", :db do around do |example| - connection.execute <<-EOS + connection.execute <<~EOS CREATE TABLE users ( id int PRIMARY KEY, name varchar(256), upper_name varchar(256) ); EOS - Fx.database.create_function <<-EOS + Fx.database.create_function <<~EOS CREATE OR REPLACE FUNCTION uppercase_users_name() RETURNS trigger AS $$ BEGIN NEW.upper_name = UPPER(NEW.name); RETURN NEW; END; $$ LANGUAGE plpgsql; EOS - sql_definition = <<-EOS + sql_definition = <<~EOS CREATE TRIGGER uppercase_users_name BEFORE INSERT ON users FOR EACH ROW EXECUTE FUNCTION uppercase_users_name(); EOS @@ -65,10 +65,10 @@ end it "can run reversible migrations for updating triggers" do connection.create_trigger(:uppercase_users_name) - sql_definition = <<-EOS + sql_definition = <<~EOS CREATE TRIGGER uppercase_users_name BEFORE UPDATE ON users FOR EACH ROW EXECUTE FUNCTION uppercase_users_name(); EOS