small medium large xlarge

03 Oct 2013, 19:38
craig ferry (14 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
craig ferry (14 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