spec/routes_spec.rb in mholling-subdomain_routes-0.2.0 vs spec/routes_spec.rb in mholling-subdomain_routes-0.2.1
- old
+ new
@@ -1,13 +1,8 @@
require 'spec_helper'
describe "subdomain routes" do
- before(:each) do
- ActionController::Routing::Routes.clear!
- SubdomainRoutes::Config.stub!(:domain_length).and_return(2)
- end
-
it "should check the validity of each subdomain" do
SubdomainRoutes.should_receive(:valid_subdomain?).twice.and_return(true, true)
lambda { map_subdomain(:www, :www1) { } }.should_not raise_error
end
@@ -156,11 +151,9 @@
end
end
describe "ActionController::Routing::Routes" do
before(:each) do
- SubdomainRoutes::Config.stub!(:domain_length).and_return(2)
- ActionController::Routing::Routes.clear!
map_subdomain(:www, nil) { |www| www.root :controller => "homes", :action => "show" }
end
it "should know a list of its reserved subdomains" do
ActionController::Routing::Routes.reserved_subdomains.should == [ "www", "" ]