From 21b19db5a30fcb6db83f4ac9302cc94c6320a0db Mon Sep 17 00:00:00 2001 From: Jamie Winsor Date: Mon, 1 Aug 2011 11:27:28 -0700 Subject: refactor engine testing scenario Engine is now tested standalone by leveraging a dummy rails app Enable Guard for speedy testing Move factories to the more standard location `spec/factories/*` Update README with a Testing section Rename migrations to contain datetimestamps for their version to fix migration order issues when migrating the dummy application --- config/cucumber.yml | 10 ++++++++++ config/environment.rb | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 config/cucumber.yml create mode 100644 config/environment.rb (limited to 'config') diff --git a/config/cucumber.yml b/config/cucumber.yml new file mode 100644 index 0000000..368422a --- /dev/null +++ b/config/cucumber.yml @@ -0,0 +1,10 @@ +<% +ENV["RAILS_ENV"] ||= "test" +require ::File.expand_path('../spec/dummy/config/environment', __FILE__) +rerun = IO.read('rerun.txt') if File.file?('rerun.txt') +rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" +std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip -r features" +%> +default: <%= std_opts %> +wip: --tags @wip:3 --wip features +rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip \ No newline at end of file diff --git a/config/environment.rb b/config/environment.rb new file mode 100644 index 0000000..5cdbfa5 --- /dev/null +++ b/config/environment.rb @@ -0,0 +1,3 @@ +# TODO: Remove this when you figure out how to get Cucumber to look for the +# environment file in the dummy app instead of within the project root +require File.expand_path('../../spec/dummy/config/environment', __FILE__) -- cgit v1.2.3