Created
January 13, 2009 16:51
-
-
Save teamon/46515 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sets up the Merb environment for Cucumber (thanks to krzys and roman) | |
require "rubygems" | |
# Add the local gems dir if found within the app root; any dependencies loaded | |
# hereafter will try to load from the local gems before loading system gems. | |
if (local_gem_dir = File.join(File.dirname(__FILE__), '..', 'gems')) && $BUNDLE.nil? | |
$BUNDLE = true; Gem.clear_paths; Gem.path.unshift(local_gem_dir) | |
end | |
require "merb-core" | |
require "spec" | |
require "merb_cucumber/world/webrat" | |
require "merb_cucumber/helpers/datamapper" | |
# Uncomment if you want transactional fixtures | |
# Merb::Test::World::Base.use_transactional_fixtures | |
# Quick fix for post features running Rspec error, see | |
# http://gist.github.com/37930 | |
def Spec.run? ; true; end | |
Merb.start_environment(:testing => true, :adapter => 'runner', :environment => ENV['MERB_ENV'] || 'test') | |
require Merb.root / :features / :support / "exception_hack.rb" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment