Skip to content

Commit

Permalink
Fixes db:setup example
Browse files Browse the repository at this point in the history
  • Loading branch information
thisismydesign committed May 17, 2018
1 parent 96fb32e commit 8fec737
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spec/dotenv_rails_db_tasks_fix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,22 @@ def remove_db_files

describe "rake tasks" do
describe "db:create" do
after do
Rake::Task["db:create"].reenable
end

it "outputs DB creation message for 'development' and 'test' DBs" do
output = "Created database 'file:mem_db_development?mode=memory'\nCreated database 'file:mem_db_test?mode=memory'\n"
expect { Rake::Task["db:create"].invoke }.to output(output).to_stdout
end
end

describe "db:setup" do
skip "outputs DB creation message for 'development' and 'test' DBs" do
# TODO: figure out why db:drop doesn't work
# OR reinitialize DB between tests
after do
Rake::Task["db:setup"].reenable
end

it "outputs DB creation message for 'development' and 'test' DBs" do
output = "Created database 'file:mem_db_development?mode=memory'\nCreated database 'file:mem_db_test?mode=memory'\n"
expect { Rake::Task["db:setup"].invoke }.to output(output).to_stdout
end
Expand Down

0 comments on commit 8fec737

Please sign in to comment.