Sha256: 499a55b276a86c2652eaad193d23f152843f04d22a7d8eb0eaf79af267e9b287
Contents?: true
Size: 748 Bytes
Versions: 5
Compression:
Stored size: 748 Bytes
Contents
require "spec_helper" describe "Mascot routes", type: :routing do context "routes enabled" do before do Mascot.configuration.routes = true Rails.application.reload_routes! end it "generates link" do expect(page_path("hi")).to eql("/hi") end it "is routable" do expect(get("/hi")).to route_to(controller: "mascot/site", action: "show", resource_path: "hi") end end context "routes disabled" do before do Mascot.configuration.routes = false Rails.application.reload_routes! end it "is not routable" do expect(get("/hi")).to_not be_routable end it "does not generate link" do expect{page_path("hi")}.to raise_exception(NoMethodError) end end end
Version data entries
5 entries across 5 versions & 1 rubygems