Specs now correctly use a multisite test app.
This commit is contained in:
parent
915a28dc0a
commit
2a5861e8a7
@ -181,9 +181,4 @@ describe 'Bushido support' do
|
||||
load 'site.rb'
|
||||
end
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
Locomotive.configure_for_test(true)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -172,9 +172,4 @@ describe 'Heroku support' do
|
||||
load 'site.rb'
|
||||
end
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
Locomotive.configure_for_test(true)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -182,10 +182,4 @@ describe 'Locomotive rendering system' do
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
ENV['APP_TLD'] = nil
|
||||
Locomotive.configure_for_test(true)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -247,13 +247,6 @@ describe Locomotive::Routing::SiteDispatcher do
|
||||
it 'returns false' do
|
||||
@controller.send(:validate_site_membership).should be_false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# after(:all) do
|
||||
# Locomotive.configure_for_test(true)
|
||||
# end
|
||||
|
||||
end
|
||||
|
@ -90,10 +90,4 @@ describe Locomotive::Account do
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
ENV['APP_TLD'] = nil
|
||||
Locomotive.configure_for_test(true)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -177,11 +177,6 @@ describe Locomotive::ContentInstance do
|
||||
end
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
ENV['APP_TLD'] = nil
|
||||
Locomotive.configure_for_test(true)
|
||||
end
|
||||
|
||||
def build_content(options = {})
|
||||
@content_type.contents.build({ :title => 'Locomotive', :description => 'Lorem ipsum....' }.merge(options))
|
||||
end
|
||||
|
@ -260,11 +260,6 @@ describe Locomotive::ContentType do
|
||||
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
ENV['APP_TLD'] = nil
|
||||
Locomotive.configure_for_test(true)
|
||||
end
|
||||
|
||||
def build_content(content_type)
|
||||
content_type.contents.build(:name => 'Asset on steroids', :description => 'Lorem ipsum', :active => true)
|
||||
end
|
||||
|
@ -231,9 +231,4 @@ describe Locomotive::Page do
|
||||
@page.errors[:redirect_url].should == ["is invalid"]
|
||||
end
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
ENV['APP_TLD'] = nil
|
||||
Locomotive.configure_for_test(true)
|
||||
end
|
||||
end
|
||||
|
@ -17,6 +17,10 @@ RSpec.configure do |config|
|
||||
|
||||
config.mock_with :mocha
|
||||
|
||||
config.before(:suite) do
|
||||
Locomotive.configure_for_test(true)
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
Locomotive.config.heroku = false
|
||||
end
|
||||
|
@ -3,12 +3,12 @@ FactoryGirl.define do
|
||||
## Site ##
|
||||
factory :site, :class => Locomotive::Site do
|
||||
name 'Acme Website'
|
||||
# subdomain 'acme'
|
||||
subdomain 'acme'
|
||||
created_at Time.now
|
||||
|
||||
factory "test site" do
|
||||
name 'Locomotive test website'
|
||||
# subdomain 'test'
|
||||
subdomain 'test'
|
||||
|
||||
after_build do |site_test|
|
||||
site_test.memberships.build :account => Locomotive::Account.where(:name => "Admin").first || Factory("admin user"), :role => 'admin'
|
||||
@ -16,7 +16,7 @@ FactoryGirl.define do
|
||||
|
||||
factory "another site" do
|
||||
name "Locomotive test website #2"
|
||||
# subdomain "test2"
|
||||
subdomain "test2"
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user