03 Oct 2013, 19:38
Generic-user-small

craig ferry (12 posts)

When the code switches from sending out json to sending out html or json depending on the header sent my rspec tests crash and burn.

I have tried adding

get "/bookmarks", :format => :json

but this makes no difference.

Can anyone put me out of my misery and point me in the right direction?

04 Oct 2013, 11:41
Generic-user-small

craig ferry (12 posts)

Okay many apologies this is nested in the erb directory on your code download but it would be a great help if the text could mention the format of the get request in the test needs to change to

get "/bookmarks", {}, {"HTTP_ACCEPT" => "application/json"}

Loving the book!

  You must be logged in to comment