spec/spec_helper.rb in scidea-schools-1.0.0 vs spec/spec_helper.rb in scidea-schools-1.0.1

- old
+ new

@@ -14,16 +14,16 @@ require File.expand_path("../../features/support/seed_user_roles.rb", __FILE__) # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} +Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.mock_with :rspec config.use_transactional_fixtures = true - + config.before(:suite) do DatabaseCleaner.strategy = :transaction DatabaseCleaner.clean_with(:truncation) ::SeedUserRoles.seed end @@ -37,9 +37,13 @@ end config.after(:suite) do ::SeedUserRoles.clean end + + config.include Devise::TestHelpers, :type => :controller + config.include Devise::TestHelpers, :type => :view + config.extend ControllerMacros, :type => :controller end # load local factories which will be added to the factories from scidea. Rails.configuration.after_initialize do FactoryGirl.definition_file_paths = [File.expand_path('../factories', __FILE__)]