Skip to content

Commit

Permalink
Automatically create a rails app for running cucumber when required
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Apr 5, 2010
1 parent 207f502 commit 2d62670
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 26 deletions.
6 changes: 6 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
== 0.2.7 - 5 Apr 2010

* 1 minor improvement
* just rake 'rake cucumber' and a rails app will be setup for you if required (rails 2.3 only ATM)


== 0.2.6 - 5 Apr 2010

* 2 improvements
Expand Down
4 changes: 1 addition & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ To run the specs do:

rake spec

To run the features do:
To run the features (rails 2.3 only ATM):

rake cucumber

The first time you do this, instructions will appear about how to set up a test rails app.

== Contributors

Expand Down
37 changes: 15 additions & 22 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,24 @@ end

desc "setup a rails app for running cucumber"
file "cucumber_test_app" do
raise <<-EOD
** Please setup a test rails app in cucumber_test_app **
Until this is automated, do something like:
(make sure cucumber, cucumber-rails, rspec, rspec-rails, machinist, and factory_girl are all installed as gems)
rails cucumber_test_app
cd cucumber_test_app
script/generate rspec
script/generate cucumber
cd vendor/plugins
ln -s ../../.. pickle
cd ../../..
Then run
rake cucumber
** thanks! **
puts "** setting up cucumber test app ** (rails 2.3 only at present)"
Rake::Task['cucumber:setup'].invoke
end

EOD
namespace :cucumber do
task :setup do
rm_rf "cucumber_test_app"
sh "rails cucumber_test_app"
cd "cucumber_test_app" do
sh "script/generate rspec"
sh "script/generate cucumber"
end
sh "ln -s #{File.expand_path('.')} cucumber_test_app/vendor/plugins/pickle"
end
end

task :ci => ['rcov:verify', 'cucumber']

begin
require 'jeweler'

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.6
0.2.7

0 comments on commit 2d62670

Please sign in to comment.