Sha256: 69f6abfa8f4015f712d188cfe314e325a48b694d344e5dfa625c0231cd16f08f
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
require 'cucumber/rake/task' cucumber_options = lambda do |t| # if you want to pass some custom options to cucumber, pass them here t.binary = Merb.root / 'bin' / 'cucumber' if File.exist?(Merb.root / 'bin' / 'cucumber') # We need use fork cucumber since cucumber > 0.3.4 t.fork = true # Add all requirement like before cucumber<0.3.4 t.cucumber_opts = '' require_list = Array(FileList[File.join(File.dirname(__FILE__),"../../features/**/*.rb")]) require_list.each do |step_file| t.cucumber_opts << '--require' t.cucumber_opts << step_file end end Cucumber::Rake::Task.new(:features, &cucumber_options) Cucumber::Rake::FeatureTask.new(:feature, &cucumber_options) namespace :merb_cucumber do task :test_env do Merb.start_environment(:environment => "test", :adapter => 'runner') end end <% if orm == :datamapper %> dependencies = ['merb_cucumber:test_env', 'db:automigrate'] task :features => dependencies task :feature => dependencies <% else %> task :features => 'merb_cucumber:test_env' task :feature => 'merb_cucumber:test_env' <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
merb_cucumber-0.5.1.2 | lib/generators/cucumber/templates/lib/tasks/cucumber.rake |