diff --git a/spec/roda/phlex_spec.rb b/spec/roda/phlex_spec.rb index fcd2aa6..6e888d4 100644 --- a/spec/roda/phlex_spec.rb +++ b/spec/roda/phlex_spec.rb @@ -112,7 +112,7 @@ def app it "works" do get "/more", {a: 1, b: 2} - expect(last_response.body).to eq("
{"a"=>"1", "b"=>"2"}") + expect(last_response.body).to eq("
{"a":"1","b":"2"}") expect(last_response.media_type).to eq("text/html") end end diff --git a/spec/support/views.rb b/spec/support/views.rb index ed8d58e..01384a7 100644 --- a/spec/support/views.rb +++ b/spec/support/views.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "json" + class FooView < Phlex::HTML def initialize(text = "foo") @text = text @@ -22,7 +24,7 @@ def view_template class MoreDetailsView < Phlex::HTML def view_template - pre { app.request.params.inspect } + pre { JSON.dump(app.request.params) } end end