I\'m using the rails-api gem to build a web service and want to test my API with RSpec. Every request I make, regardless of the HTTP method has the CONTENT_TYPE
hea
A lot of frustration and variations and that's what worked for me. Rails 3.2.12 Rspec 2.10
@request.env["HTTP_ACCEPT"] = "application/json"
@request.env["CONTENT_TYPE"] = "application/json"
put :update, :id => 1, "email" => "bing@test.com"
wrap_parameters seems to be working declared this way
wrap_parameters User, format: :json
being used for User
model