Sha256: 6040e04985962e3602c21e51187482d8b4bf0ac0da9a59fb3994711d60828539
Contents?: true
Size: 869 Bytes
Versions: 1
Compression:
Stored size: 869 Bytes
Contents
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'coveralls' Coveralls.wear! require 'rspec' require 'action_controller/railtie' require 'gaffe' RSpec.configure do |config| config.before(:each) do # Fake Rails.root Rails.stub(:root).and_return(RAILS_ROOT) # Fake Rails.application Rails.stub(:application).and_return OpenStruct.new(config: OpenStruct.new, env_config: {}) # Make sure we clear memoized variables before each test [:@configuration].each do |variable| Gaffe.send :remove_instance_variable, variable if Gaffe.instance_variable_defined?(variable) end end end # We need a fake "ApplicationController" because Gaffe's default controller inherits from it class ApplicationController < ActionController::Base end # We need Rails.root RAILS_ROOT = Pathname.new(File.expand_path('../../', __FILE__))
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gaffe-1.0.2 | spec/spec_helper.rb |