Sha256: 7858ad8dcd31ad4aafca98e321fa4db83d4120a4edf4aba3771e6b1453ba1117
Contents?: true
Size: 726 Bytes
Versions: 23
Compression:
Stored size: 726 Bytes
Contents
require "bundler/gem_tasks" require "rspec/core/rake_task" require "open3" RSpec::Core::RakeTask.new(:spec) task default: :spec desc 'This updates the models and migrations used by the testing Rails Dummy app and should be run whenever those are updated.' task :update_test_schema do puts "Updating test models and migration files..." stream_command("spec/dummy/bin/rails generate canvas_sync:install --models all --force") puts "Updating the test database and schema..." stream_command("cd spec/dummy; bundle exec rake db:drop; bundle exec rake db:migrate") end def stream_command(cmd) Open3.popen2e(cmd) do |stdin, stdout_stderr, wait_thr| while line = stdout_stderr.gets puts line end end end
Version data entries
23 entries across 23 versions & 1 rubygems