Sha256: 2a7c4e9a6ba6a8c9512a4355b96673804541164bc5520541ebbb03b2968a9c8f

Contents?: true

Size: 931 Bytes

Versions: 10

Compression:

Stored size: 931 Bytes

Contents

ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../dummy/config/environment.rb",  __FILE__)
require 'rspec/rails'
require 'database_cleaner'
require 'shoulda-matchers'
require 'factory_girl'

ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')

Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }

FactoryGirl.definition_file_paths = [File.join(ENGINE_RAILS_ROOT, 'spec', 'factories')]
FactoryGirl.find_definitions

RSpec.configure do |config|
  config.mock_with :rspec
  config.use_transactional_fixtures = false
  config.include Factory::Syntax::Methods
  config.include Capybara::DSL, :example_group => { :file_path => /\bspec\/integration\// }

  config.before(:suite) do
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.clean_with(:truncation)
  end

  config.before(:each) do
    DatabaseCleaner.start
  end

  config.after(:each) do
    DatabaseCleaner.clean
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
manageable_content-0.2.6 spec/spec_helper.rb
manageable_content-0.2.5 spec/spec_helper.rb
manageable_content-0.2.4 spec/spec_helper.rb
manageable-0.1.0 spec/spec_helper.rb
manageable_content-0.2.3 spec/spec_helper.rb
manageable_content-0.2.2 spec/spec_helper.rb
manageable_content-0.2.1 spec/spec_helper.rb
manageable_content-0.2.0 spec/spec_helper.rb
manageable_content-0.1.1 spec/spec_helper.rb
manageable_content-0.0.1 spec/spec_helper.rb