# frozen_string_literal: true require "spec_helpers" describe Wayfarer::Routing::Matchers::Scheme do describe "#match" do subject(:matcher) { Wayfarer::Routing::Matchers::Scheme.new(:http) } context "with matching URL" do let(:url) { Addressable::URI.parse("http://example.com") } it "returns true" do expect(matcher).to match(url) end end context "with mismatching URL" do let(:url) { Addressable::URI.parse("https://example.com") } it "returns true" do expect(matcher).not_to match(url) end end end end