Now running features with Rake

This commit is contained in:
Joe Ferris 2009-09-15 15:56:54 -04:00
parent 42dbfc8a60
commit 15f36c8fc9
2 changed files with 9 additions and 2 deletions

View File

@ -6,9 +6,10 @@ require 'rcov/rcovtask'
require 'date'
require 'spec/rake/spectask'
require 'cucumber/rake/task'
desc 'Default: run the specs.'
task :default => :spec
desc 'Default: run the specs and features.'
task :default => [:spec, :features]
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
@ -73,3 +74,8 @@ task :gemspec do
f.write spec.to_ruby
end
end
Cucumber::Rake::Task.new(:features) do |t|
t.fork = true
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
end

View File

@ -22,6 +22,7 @@ Factory.factories.values.each do |factory|
Factory.create(factory.factory_name, attributes)
end
# TODO: support irregular pluralizations
Given "the following #{factory.human_name}s exist:" do |table|
table.hashes.each do |human_hash|
attributes = convert_human_hash_to_attribute_hash(human_hash)