From d3eff64d19c845dc947a2872644eb514058db762 Mon Sep 17 00:00:00 2001 From: Jamie Winsor Date: Wed, 3 Aug 2011 20:33:13 -0700 Subject: Add rake tasks to initialize the testing environment Update README to reflect new functionality --- Rakefile | 3 +++ lib/refinery/tasks/testing.rake | 21 +++++++++++++++++++++ readme.md | 4 +--- spec/dummy | 2 +- 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 lib/refinery/tasks/testing.rake diff --git a/Rakefile b/Rakefile index 699f74d..0c5b448 100644 --- a/Rakefile +++ b/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' diff --git a/lib/refinery/tasks/testing.rake b/lib/refinery/tasks/testing.rake new file mode 100644 index 0000000..7b71639 --- /dev/null +++ b/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 diff --git a/readme.md b/readme.md index 11e9c53..ca11075 100644 --- a/readme.md +++ b/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) diff --git a/spec/dummy b/spec/dummy index 84d6635..f672041 160000 --- a/spec/dummy +++ b/spec/dummy @@ -1 +1 @@ -Subproject commit 84d66350ec474665e7d436dca479a142b091f874 +Subproject commit f6720415b9f53b2a3a3b2c9b9d597e3188e2c615 -- cgit v1.2.3