Skip to content

Commit

Permalink
Merge pull request #6 from nextmat/prettier_debug
Browse files Browse the repository at this point in the history
Enhance param debugging resource read & update
  • Loading branch information
josephruscio committed Nov 4, 2011
2 parents a418fe8 + b3b2b7a commit de4fff1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rack-test-rest.rb
Expand Up @@ -61,7 +61,7 @@ def read_resource(params={})
uri = "#{resource_uri}#{@rack_test_rest[:extension]}"
end

puts "GET #{uri} #{params}" if @rack_test_rest[:debug]
puts "GET #{uri} #{params.pretty_inspect}" if @rack_test_rest[:debug]
get uri, params

return handle_error_code(expected_code) if expected_code
Expand All @@ -84,7 +84,7 @@ def update_resource(params={})
id = params[:id]
params.delete(:id)

puts "Attempting to update #{id} with #{params}" if @rack_test_rest[:debug]
puts "Attempting to update #{id} with #{params.pretty_inspect}" if @rack_test_rest[:debug]

put "#{resource_uri}/#{id}#{@rack_test_rest[:extension]}", params

Expand Down

0 comments on commit de4fff1

Please sign in to comment.