begin
  require File.dirname(__FILE__) + '/../../../../spec/spec_helper'
rescue LoadError
  puts "You need to install rspec in your base app"
  exit
end

plugin_spec_dir = File.dirname(__FILE__)
ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")

require 'database_cleaner'
DatabaseCleaner.strategy = :truncation, {:except => ['settings']}

RSpec.configure do |config|
  config.use_transactional_fixtures = false

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


begin
  require File.dirname(__FILE__) + '/../../../../spec/spec_helper'
rescue LoadError
  puts "You need to install rspec in your base app"
  exit
end

require File.dirname(__FILE__) + "/factories.rb"

plugin_spec_dir = File.dirname(__FILE__)
ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")

require 'database_cleaner'
DatabaseCleaner.strategy = :truncation, {:except => ['settings']}

RSpec.configure do |config|
  config.use_transactional_fixtures = false

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


Revert "Removed unneeded factories declaration, since master loads all spec factories"
Revert "Removed unneeded factories declaration, since master loads all spec factories"

This reverts commit b6b80ea984b4526187076c6518ccae0ae3a42801.
