Rakefile in attr_initializable-0.0.1 vs Rakefile in attr_initializable-0.0.2
- old
+ new
@@ -10,21 +10,22 @@
require 'rdoc/rdoc'
require 'rake/rdoctask'
RDoc::Task = Rake::RDocTask
end
+require File.expand_path('../test/test_utils', __FILE__)
+
+puts "Testing against Rails #{TestUtils.rails_version} with dummy application in #{TestUtils.dummy_app_dir}"
+
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'AttrInitializable'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end
-
-
-
Bundler::GemHelper.install_tasks
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
@@ -32,7 +33,11 @@
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end
+task :test_db_reset do |t|
+ sh "cd test/#{TestUtils.dummy_app_dir}/ && RAILS_ENV=test bundle exec rake db:reset"
+end
task :default => :test
+