Testing routes in jets

question

#1

Trying to test routes similar how you would do it in rails:

describe 'Routes Spec', type: :routing do
  describe 'Visitors' do
     it "should route '/visitors', :to => 'visitors#create'" do
       expect(:post => "/").to route_to(:controller => "create")
    end
  end
end

But I get the following error:

NoMethodError:
undefined method route_to' for #<RSpec::ExampleGroups::RoutesSpec::Visitors:0x00007f87e5e62570> # ./spec/integration/routes_spec.rb:6:inblock (3 levels) in <top (required)>’

Is there a way to test route set up in jets?


#2

require rspec_helper does not fix the issue either


#3

Routes spec helpers are not supported. PRs welcome though.