diff --git a/spec/integration/role_constrained_routes_spec.rb b/spec/integration/role_constrained_routes_spec.rb index b4072840..acc802eb 100644 --- a/spec/integration/role_constrained_routes_spec.rb +++ b/spec/integration/role_constrained_routes_spec.rb @@ -8,7 +8,8 @@ describe "role-constrained routes", type: :request do it "fails to access route" do # 302 = redirect to login # 404 = no user found -- we have a fallback route if something could not be matched - expect(subject).to be_in [302, 404] + result = begin; subject; rescue ActionController::RoutingError; :no_route; end + expect(result).to be_in [302, 404, :no_route] end end