Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spec for 'rake db:dev_seed' task #2201

Merged
merged 1 commit into from
Dec 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions spec/lib/tasks/dev_seed_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require 'rails_helper'
require 'rake'

describe 'rake db:dev_seed' do
before do
Rake.application.rake_require('tasks/db')
Rake::Task.define_task(:environment)
end

let :run_rake_task do
Rake::Task['db:dev_seed'].reenable
Rake.application.invoke_task('db:dev_seed')
end

it 'seeds the database without errors' do
expect { run_rake_task }.to_not raise_error
end
end