You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think its because :type => :request is already set on example groups in spec/api/ when using rspec-rails.
Not sure what the right fix in this case should be. Whether using ':type' key to mark example groups should be disallowed and that should be documented somewhere or whether rspec-rails should use :type => :api for example groups in spec/api/ and have the include request helpers, or whether there should be some other way to overload the functionality...
Let me know if there is something I can do.
The text was updated successfully, but these errors were encountered:
Verified: I think rspec-rails is being opinioned here and "owning" the spec/api directory. It automatically tags specs in spec/api, spec/integration, and spec/requests as :request.
I recommend you include your ApiHelper for :type => :request or use a different directory.
if rspec-rails is owning spec/api and spec/integration, would it be more elegant to tag specs in them has :api and :integration respectively ? The appropriate request (and other) helpers could be included for those tags then.
I recently tried using
:type => :api
for marking example groups I want to use an api helper in, by doing something likebut realized that things weren't working as expected. Also, something like
worked fine.
I think its because
:type => :request
is already set on example groups in spec/api/ when using rspec-rails.Not sure what the right fix in this case should be. Whether using ':type' key to mark example groups should be disallowed and that should be documented somewhere or whether rspec-rails should use
:type => :api
for example groups in spec/api/ and have the include request helpers, or whether there should be some other way to overload the functionality...Let me know if there is something I can do.
The text was updated successfully, but these errors were encountered: