Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
zverok committed Dec 14, 2024
1 parent 7dcbc33 commit d060688
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/dumper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ def after(env)
Then { expect(dump use_middleware: false).to match(/\\"substring\\"\(\(random/) }
end

context "column with a whitespace", postgresql: :only do
before(:each) do
migration.execute %Q{ALTER TABLE "things" ADD "whitespaced column" integer}
end

Then { expect(dump use_middleware: false).to include('t.integer "whitespaced column"') }
end

context TestDumper::Middleware::Dumper::Initial do
Then { expect(dump).to match(/Schema([\[\].0-9]+)?[.]define.*do\s+#{middleware}/) }
end
Expand Down

0 comments on commit d060688

Please sign in to comment.