test_helper.rb 874 B

123456789101112131415161718192021222324252627282930
  1. # Configure Rails Envinronment
  2. ENV["RAILS_ENV"] = "test"
  3. require 'rubygems'
  4. require 'bundler/setup'
  5. require 'rails'
  6. require "rails/test_help"
  7. require 'sass/rails'
  8. require 'sfl'
  9. require 'mocha'
  10. Rails.backtrace_cleaner.remove_silencers!
  11. # If developing against local dependencies, this code will ensure they get picked up
  12. # in the project fixtures that have their own bundle environment
  13. $gem_options = {}
  14. possible_dev_dependencies = %w(sass-rails sass rails actionpack railties sprockets)
  15. Bundler.load.specs.each do |s|
  16. if possible_dev_dependencies.include?(s.name)
  17. gem_path = s.full_gem_path
  18. gem_options = {:version => s.version}
  19. gem_options[:path] = gem_path if File.exists?("#{gem_path}/#{s.name}.gemspec")
  20. $gem_options[s.name] = gem_options
  21. end
  22. end
  23. # Load support files
  24. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }