engine/spec/lib/locomotive/configuration_spec.rb

26 lines
735 B
Ruby
Raw Normal View History

2011-07-08 22:47:05 +00:00
require 'spec_helper'
describe Locomotive::Configuration do
before(:each) do
@old_config = Locomotive.config.dup
end
it 'allows a different value for the reserved subdomains' do
Locomotive.config.reserved_subdomains.include?('www').should be_true # by default
Locomotive.config.multi_sites { |multi_sites| multi_sites.reserved_subdomains = %w(empty) }
Locomotive.config.reserved_subdomains.should == ['empty']
end
it 'calls the hosting enabler if provided' do
Rails.env.stubs(:test?).returns(false)
Locomotive.expects(:enable_bushido).once
2012-02-18 14:55:20 +00:00
Locomotive.config.hosting = { :target => :bushido }
Locomotive.enable_hosting
end
2011-07-08 22:47:05 +00:00
after(:each) do
Locomotive.config = @old_config
end
end