Sha256: 16eb202d01544dece4e6ccaaf83738158394b930b2798759483accd3ae7566da

Contents?: true

Size: 445 Bytes

Versions: 8

Compression:

Stored size: 445 Bytes

Contents

require "spec_helper"

describe Mascot::RouteConstraint do
  let(:subject) { Mascot::RouteConstraint.new }

  context "#matches?" do
    it "returns true if match" do
      request = double("request", path: "/time")
      expect(subject.matches?(request)).to be(true)
    end
    it "returns false if not match" do
      request = double("request", path: "/does-not-exist")
      expect(subject.matches?(request)).to be(false)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mascot-rails-0.1.16 spec/mascot/route_constraint_spec.rb
mascot-rails-0.1.15 spec/mascot/route_constraint_spec.rb
mascot-rails-0.1.14 spec/mascot/route_constraint_spec.rb
mascot-rails-0.1.12 spec/mascot/route_constraint_spec.rb
mascot-rails-0.1.11 spec/mascot/route_constraint_spec.rb
mascot-rails-0.1.10 spec/mascot/route_constraint_spec.rb
mascot-rails-0.1.9 spec/mascot/route_constraint_spec.rb
mascot-rails-0.1.8 spec/mascot/route_constraint_spec.rb