-
-
Save zorbash/4435266 to your computer and use it in GitHub Desktop.
This file contains 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
PADRINO_ENV = 'test' unless defined?(PADRINO_ENV) | |
require 'rubygems' | |
require 'spork' | |
Spork.prefork do | |
# Loading more in this block will cause your tests to run faster. However, | |
# if you change any configuration or code from libraries loaded here, you'll | |
# need to restart spork for it take effect. | |
require File.expand_path(File.dirname(__FILE__) + "/../../config/boot") | |
require 'capybara/cucumber' | |
require 'rspec/expectations' | |
# Database cleaner | |
require 'database_cleaner' | |
require 'database_cleaner/cucumber' | |
DatabaseCleaner.strategy = :transaction | |
# Factory Girl | |
require 'factory_girl' | |
require Padrino.mounted_root + '/spec/factories.rb' | |
## | |
# You can handle all padrino applications using instead: | |
# Padrino.application | |
Capybara.app = Padrino.application | |
# Capybara.current_driver = :selenium | |
# Include factory girl step definitions | |
Before do | |
require 'factory_girl/step_definitions' | |
end | |
end | |
Spork.each_run do | |
# This code will be run each time you run your specs. | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment