Skip to content
Browse files

Add rake tasks to initialize the testing environment

Update README to reflect new functionality
  • Loading branch information...
1 parent 274ba14 commit d3eff64d19c845dc947a2872644eb514058db762 Jamie Winsor committed Aug 3, 2011
Showing with 26 additions and 4 deletions.
  1. +3 −0 Rakefile
  2. +21 −0 lib/refinery/tasks/testing.rake
  3. +1 −3 readme.md
  4. +1 −1 spec/dummy
View
3 Rakefile
@@ -22,5 +22,8 @@ end
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
load 'rails/tasks/engine.rake'
+load 'refinery/tasks/testing.rake'
Bundler::GemHelper.install_tasks
+
+task :default => 'refinery:testing:setup'
View
21 lib/refinery/tasks/testing.rake
@@ -0,0 +1,21 @@
+namespace :refinery do
+ namespace :testing do
+
+ desc "Initialize the testing environment"
+ task :setup => [
+ :init_dummy_app,
+ :init_test_database
+ ]
+
+ task :init_dummy_app do
+ system "git submodule init"
+ system "git submodule update"
+ end
+
+ task :init_test_database => [
+ 'app:db:migrate',
+ 'app:db:test:prepare'
+ ]
+
+ end
+end
View
4 readme.md
@@ -37,9 +37,7 @@ The version of Refinery to develop this engine against is defined in the gemspec
Setup the test environment
- $ bundle install
- $ bundle exec rake app:db:migrate
- $ bundle exec rake app:db:test:prepare
+ $ bundle exec rake refinery:testing:setup
Run the test suite with [Guard](https://github.com/guard/guard)
2 spec/dummy
@@ -1 +1 @@
-Subproject commit 84d66350ec474665e7d436dca479a142b091f874
+Subproject commit f6720415b9f53b2a3a3b2c9b9d597e3188e2c615

0 comments on commit d3eff64

Please sign in to comment.
Something went wrong with that request. Please try again.