#!/usr/bin/env rake begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end Bundler::GemHelper.install_tasks # Load the dummy app's rake tasks APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__) load 'rails/tasks/engine.rake' desc 'Run the JavaScript tests' ENV['TEASPOON_RAILS_ENV'] = File.expand_path('../test/dummy/config/environment', __FILE__) task teaspoon: 'app:teaspoon' desc 'Start a server at http://localhost:3000/teaspoon for JavaScript tests' task :teaspoon_server do Dir.chdir("test/dummy") teaspoon_env = File.expand_path('../test/teaspoon_env.rb', __FILE__) system "RAILS_ENV=test TEASPOON_ENV=#{teaspoon_env} rails s" end