I'm doing rails engine and I have controller that has to render json as response. Everything works as expected when I do Curl but with Rspec it renders just string instead of compiled json.
Here it is:
describe SyncController, type: :controller do
render_views
.....
it "returns last event unique_identifier" do
get :index, { use_route: :my_engine, format: :json, event_id: @v1.unique_identifier }
.......
end
end
Hi all,
I'm doing rails engine and I have controller that has to render
json
as response. Everything works as expected when I do Curl but with Rspec it renders just string instead of compiled json.Here it is:
My
response.body
here is:So based on this, it seems it lookup into
rabl
file but it doesn't read it properly.This is really annoying but I really don't know what is trick.
Any help would be appreciated. Thanks