Looks like a bug in RSpec but maybe I'm missing something.
I have a request spec where I post a JSON that contains an array of hashes:
spec/requests/dummy_request_spec.rb:
post "http://my.server.com/some/route", {
format: :json,
data: [
{
details: {
param1: 1
},
},
{
details: {
param2: 1
}
}
]
}
For some odd reason, RSpec merges the hashes into one element and then sends them to server. print out of params received in controller:
data: [
{
details: {
param1: 1,
param2: 2
},
},
]
versions: rspec-2.13.0 rails-3.2.10
Very strange!!
Thanks