Sha256: 539a807ca693990c9e83681a02925c9973e47a22075b1f221eee9022da4236bd

Contents?: true

Size: 659 Bytes

Versions: 2

Compression:

Stored size: 659 Bytes

Contents

require 'spec_helper'

module Draper
  RSpec.describe Configuration do
    it 'yields Draper on configure' do
      Draper.configure { |config| expect(config).to be Draper }
    end

    it 'defaults default_controller to ApplicationController' do
      expect(Draper.default_controller).to be ApplicationController
    end

    it 'allows customizing default_controller through configure' do
      default = Draper.default_controller

      Draper.configure do |config|
        config.default_controller = CustomController
      end

      expect(Draper.default_controller).to be CustomController

      Draper.default_controller = default
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
draper-3.0.1 spec/draper/configuration_spec.rb
draper-3.0.0 spec/draper/configuration_spec.rb