I would like to use such pattern: /(something/:optional/)and/:always but router doesn't catch it. Failing test:
describe "optional variable with variable" do
let(:router) do
described_class.new do
get "/(test1/:foo/)test2/:bar", as: :variable, to: RecognitionTestCase.endpoint("variable")
end
end
it "recognizes route(s)" do
runner.run!([
[:variable, "/test1/foo/test2/bar", {foo: "foo", bar: "bar"}],
[:variable, "/test2/bar", {foo: nil, bar: "bar"}]
])
end
end
I would like to use such pattern:
/(something/:optional/)and/:always
but router doesn't catch it. Failing test:I'm not sure if it's bug or my bad usage?