Skip to content

Instantly share code, notes, and snippets.

@Momus
Last active August 29, 2015 14:21
Show Gist options
  • Save Momus/d09a5e74f0c22edf1d7d to your computer and use it in GitHub Desktop.
Save Momus/d09a5e74f0c22edf1d7d to your computer and use it in GitHub Desktop.
Using Minitest assertions for debugging in Ruby on Rails
## When you
require 'test_helper'
## and create tests with, for example,
class UsersLoginTest < ActionDispatch::IntegrationTest
## In your
test "verify an important feature" do
## you can use assert statements to print out debugging info
## the format is assert( TEST , msg = 'string')
assert_nil my_hash[:value],
msg = "My Hash:" + my_hash.to_s
end
end #class UsersLoginTest < ActionDispatch::IntegrationTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment