aboutsummaryrefslogblamecommitdiffstats
path: root/spec/spec_helper.rb
blob: 7b20bf08c1860a074421e46baca645ea4c1145c9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                  
                              
 

                             
 
                                                                 
 

                        
 
                                         
 

                           

                                                

   
                                    
                                         
 





                                                                      
   
require 'rubygems'
require 'capybara/poltergeist'

# Configure Rails Environment
ENV["RAILS_ENV"] ||= 'test'

require File.expand_path("../dummy/config/environment", __FILE__)

require 'rspec/rails'
require 'capybara/rspec'

Rails.backtrace_cleaner.remove_silencers!

RSpec.configure do |config|
  config.mock_with :rspec
  config.filter_run :focus => true
  config.run_all_when_everything_filtered = true
end

# set javascript driver for capybara
Capybara.javascript_driver = :poltergeist

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories including factories.
([Rails.root.to_s] | ::Refinery::Plugins.registered.pathnames).map{|p|
  Dir[File.join(p, 'spec', 'support', '**', '*.rb').to_s]
}.flatten.sort.each do |support_file|
  require support_file
end