spec/spec_helper.rb in deface-1.5.3 vs spec/spec_helper.rb in deface-1.6.0

- old
+ new

@@ -1,16 +1,15 @@ require 'simplecov' SimpleCov.start 'rails' require 'rspec' require 'active_support' -require 'action_view' -require 'action_controller' require 'deface' require 'rails/generators' # have to manually require following for testing purposes require 'deface/action_view_extensions' require 'rails/version' +require 'pry' #adding fake class as it's needed by haml 4.0, don't #want to have to require the entire rails stack in specs. module Rails class Railtie @@ -40,11 +39,11 @@ RSpec.configure do |config| config.mock_framework = :rspec end -if Gem.loaded_specs["rails"].version < Gem::Version.new("6.0.0.beta1") +if Deface.before_rails_6? module ActionView::CompiledTemplates #empty module for testing purposes end else class ActionDispatch::DebugView @@ -67,12 +66,10 @@ allow(Rails.application).to receive(:config).and_return double('config') allow(Rails.application.config).to receive(:cache_classes).and_return true allow(Rails.application.config).to receive(:deface).and_return ActiveSupport::OrderedOptions.new Rails.application.config.deface.enabled = true - if Rails.version[0..2] >= '3.2' - allow(Rails.application.config).to receive(:watchable_dirs).and_return({}) - end + allow(Rails.application.config).to receive(:watchable_dirs).and_return({}) allow(Rails).to receive(:root).and_return Pathname.new('spec/dummy') allow(Rails).to receive(:logger).and_return double('logger') allow(Rails.logger).to receive :error