# Configure Rails Envinronment
ENV["RAILS_ENV"] = "test"

require 'rails'
require "rails/test_help"
require 'sass/rails'
require 'sfl'
require 'mocha'

Rails.backtrace_cleaner.remove_silencers!

# Set locations of local gems in this hash.
# They will be added/replaced in the generated Gemfiles
# You should also set them in the local Gemfile
$gem_locations = {
  "sass-rails" => File.expand_path("../../", __FILE__)
}

# Uncomment this if you need to test against a local rails checkout
# $gem_locations["rails"] = "/Users/chris/Projects/rails"
# Uncomment this if you need to test against a local sass checkout
# $gem_locations["sass"] = "/Users/chris/Projects/sass"
# Uncomment this if you need to test against a local sprockets checkout
# $gem_locations["sprockets"] = "/Users/chris/Projects/sprockets"


# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
# Configure Rails Envinronment
ENV["RAILS_ENV"] = "test"

require 'rails'
require "rails/test_help"
require 'sass/rails'
require 'sfl'
require 'mocha'

Rails.backtrace_cleaner.remove_silencers!


# If developing against local dependencies, this code will ensure they get picked up
# in the project fixtures that have their own bundle environment
$gem_locations = {}
possible_dev_dependencies = %w(sass-rails sass rails actionpack railties sprockets)
Bundler.load.specs.each do |s|
  if possible_dev_dependencies.include?(s.name)
     gem_path = s.full_gem_path
     if File.exists?("#{gem_path}/#{s.name}.gemspec")
       $gem_locations[s.name] = gem_path
     end
  end
end

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

Make it easier to test against gem dependencies that are bundled using a development path. All that is needed now is to add them to the top-level Gemfile.
Make it easier to test against gem dependencies that are bundled using a development path. All that is needed now is to add them to the top-level Gemfile.
