Sha256: 430d8077ae9dcb9c011bf472b432f7acd86a6b3a5b17b84dd6659d157f7ccc0a
Contents?: true
Size: 974 Bytes
Versions: 3
Compression:
Stored size: 974 Bytes
Contents
require 'spec_helper' # @see spec/dummy/config/routes.rb describe "routing to subdomains" do describe "without a subdomain" do it "routes to application#index" do expect(:get => "http://example.com/").to route_to( :controller => "application", :action => "index" ) end end describe "with a subdomain" do it "routes to application#subdomain" do expect(:get => "http://help.example.com/").to route_to( :controller => "application", :action => "subdomain" ) end end describe ":except" do it "routes to application#index" do expect(:get => "http://www.example.com/").to route_to( :controller => "application", :action => "index" ) end end describe ":only" do it "matches the given subdomain" do expect(:get => "http://blog.example.com/").to route_to( :controller => "application", :action => "blog" ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems