class BugTest

Public Instance Methods

test_association_stuff() click to toggle source
# File guides/bug_report_templates/active_record_gem.rb, line 29
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 33
def test_returns_success
  get '/'
  assert last_response.ok?
end

Private Instance Methods

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