Rakefile in chrono_model-0.11.1 vs Rakefile in chrono_model-0.12.0
- old
+ new
@@ -2,6 +2,22 @@
require "bundler/gem_tasks"
# RSpec
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
-task :default => :spec
+task :default => ['testapp:create', :spec]
+
+# Create a test Rails app in tmp/railsapp for testing the rake
+# tasks and overall Rails integration with Aruba.
+#
+namespace :testapp do
+ desc 'Create a dummy rails application for testing in /tmp'
+ task :create do
+ FileUtils.mkdir_p('tmp/aruba')
+ Dir.chdir('tmp') do
+ FileUtils.rm_rf('railsapp')
+ sh 'rails new railsapp --skip-bundle'
+ end
+ FileUtils.cp_r('spec/aruba/fixtures/railsapp/.', 'tmp/railsapp/')
+ FileUtils.rm('tmp/railsapp/Gemfile')
+ end
+end