spec
|--- apis
|--- your_api_test_spec.rb
|--- controllers
|--- models
|--- supports
|--- api_helper.rb
|--- authentication_helper.rb
spec/supports/api_helper.rb
module ApiHelper
include Rack::Test::Methods
def app
Rails.application
end
end
RSpec.configure do |config|
config.include ApiHelper, :type=>:api #apply to all spec for apis folder
end
ActionController::TestCase::Behavior
v.s.
Rack::Test::Methods