-
-
Save anonymous/1d92348b08b71a5fc798 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
require 'rubygems' | |
require 'spork' | |
ENV["RAILS_ENV"] ||= 'test' | |
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.dirname(__FILE__) + "/../config/environment" unless defined?(Rails) | |
require 'rspec/rails' | |
require 'capybara' | |
require 'capybara/dsl' | |
# require 'shoulda' | |
require 'remarkable/active_record' | |
require 'remarkable/core' | |
require 'remarkable/active_model' | |
# Requires supporting files with custom matchers and macros, etc, | |
# in ./support/ and its subdirectories. | |
end | |
Spork.each_run do | |
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} | |
Dir["#{File.dirname(__FILE__)}/**/shared/*_spec.rb"].each {|f| require f} | |
require File.dirname(__FILE__) + "/../features/support/blueprints.rb" | |
Rspec.configure do |config| | |
# == Mock Framework | |
# | |
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: | |
# | |
# config.mock_with :mocha | |
# config.mock_with :flexmock | |
# config.mock_with :rr | |
config.mock_with :rspec | |
# config.fixture_path = "#{::Rails.root}/spec/fixtures" | |
# If you're not using ActiveRecord, or you'd prefer not to run each of your | |
# examples within a transaction, comment the following line or assign false | |
# instead of true. | |
config.use_transactional_fixtures = true | |
# config.cache_classes = false | |
# If you'd prefer not to run each of your examples within a transaction, | |
# uncomment the following line. | |
# config.use_transactional_examples = false | |
# | |
# | |
contrl = lambda {|described| described < ActionController::Base} | |
config.include Devise::TestHelpers , :example_group => {:describes => contrl} | |
config.include Warden::Test::Helpers , :example_group => {:describes => contrl} | |
config.include Capybara # #, :type => :integration | |
config.include ControllerHelpers , :example_group => {:describes => contrl} | |
config.extend ControllerMacros # , :type => :controller | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment