class BugTest

Public Instance Methods

test_association_stuff() click to toggle source
# File guides/bug_report_templates/active_record_gem.rb, line 32
def test_association_stuff
  post = Post.create!
  post.comments << Comment.create!

  assert_equal 1, post.comments.count
  assert_equal 1, Comment.count
  assert_equal post.id, Comment.first.post.id
end
test_returns_success() click to toggle source
# File guides/bug_report_templates/action_controller_gem.rb, line 38
def test_returns_success
  get '/'
  assert last_response.ok?
end
test_stuff() click to toggle source
# File guides/bug_report_templates/generic_gem.rb, line 11
def test_stuff
  assert "zomg".present?
  refute "".present?
end

Private Instance Methods

app() click to toggle source
# File guides/bug_report_templates/action_controller_gem.rb, line 44
def app
  Rails.application
end