lib/rspec-api/http/rack_test.rb in rspec-api-0.1.0 vs lib/rspec-api/http/rack_test.rb in rspec-api-0.1.1

- old
+ new

@@ -1,40 +1,11 @@ require 'rack/test' +require 'rspec-api/http/local/route' +require 'rspec-api/http/local/request' def app Rails.application end -module DSL - module RackTest - module Route - extend ActiveSupport::Concern - - def send_request(verb, route, body) - header 'Accept', 'application/json' - send verb, route, body - end - end - end -end - - -module DSL - module RackTest - module Request - extend ActiveSupport::Concern - - def response - last_response - end - - def request_params - last_request.params - end - end - end -end - - RSpec.configuration.include Rack::Test::Methods, rspec_api_dsl: :route -RSpec.configuration.include DSL::RackTest::Route, rspec_api_dsl: :route -RSpec.configuration.include DSL::RackTest::Request, rspec_api_dsl: :request +RSpec.configuration.include Http::Local::Route, rspec_api_dsl: :route +RSpec.configuration.include Http::Local::Request, rspec_api_dsl: :request \ No newline at end of file