Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add all supported frameworks to rake test task

  • Loading branch information...
commit e7b7d7abd9a572296c0d6285ac9303d0a5ff3441 1 parent 022f22a
@shime shime authored
Showing with 16 additions and 2 deletions.
  1. +16 −2 Rakefile
View
18 Rakefile
@@ -8,8 +8,10 @@ rescue LoadError
exit 1
end
+SUPPORTED_FRAMEWORKS = ["sinatra","rack","metal"]
+
desc 'Default: run unit tests.'
-task :default => [:test, "cucumber:rails:all"]
+task :default => [:test, "cucumber:rails:all"] + SUPPORTED_FRAMEWORKS
desc "Clean out the tmp directory"
task :clean do
@@ -166,6 +168,7 @@ end
task :cucumber => [:vendor_test_gems]
+
def run_rails_cucumbr_task(version, additional_cucumber_args)
puts "Testing Rails #{version}"
if version.empty?
@@ -203,5 +206,16 @@ namespace :cucumber do
end
define_rails_cucumber_tasks
-end
+ rule /#{"(" + SUPPORTED_FRAMEWORKS.join("|") + ")"}/ do |t|
+ framework = t.name
+ desc "Test integration of the gem with #{framework}"
+ task framework.to_sym do
+ puts "Testing #{framework.split(":").last}..."
+ cmd = "cucumber --format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features/#{framework.split(":").last}.feature"
+ puts "Running command: #{cmd}"
+ system(cmd)
+ end
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.