Sha256: cfe57a1ef0fa8aa46b4fff44dd05760b81a25254179cd6e0fe8958b41a76bfb4
Contents?: true
Size: 615 Bytes
Versions: 4
Compression:
Stored size: 615 Bytes
Contents
require 'spec_helper' describe 'Locomotive::Middlewares::Site' do let(:site) { FactoryGirl.create('existing site') } let(:url) { 'http://models.example.com' } let(:app) { ->(env) { [200, env, "app"] } } let(:middleware) { Locomotive::Middlewares::Site.new(app) } subject { code, env = middleware.call(env_for(url)); env['locomotive.site'] } describe 'no site' do it { should be_nil } end describe 'existing site' do before { site } its(:name) { should eq 'Locomotive site with existing models' } its(:subdomain) { should eq 'models' } end end
Version data entries
4 entries across 4 versions & 1 rubygems