JSON comparations
- JSON.parse
:symbolize_names => true
describe "GET index" do it "response with json" do @expected = [{ :name => "MyString", :path_original => "MyText", :path_small => "MyText", :id => nil }] get :index, :format => :json expect(JSON.parse(response.body, :symbolize_names => true)).to eq @expected end end