<commit_before>require 'test_helper'

class NameErrorHandlingTest < ActionDispatch::IntegrationTest
  setup do
    aamine = Author.create! name: 'aamine'
    @rhg = aamine.books.create! title: 'RHG'
  end

  test 'raising NameError in a decorator' do
    err = assert_raises ActionView::Template::Error do
      visit "/authors/#{@rhg.author.id}/books/#{@rhg.id}/errata"
    end

    assert_match /undefined local variable or method `poof!` for/, err.message
  end
end<commit_msg>:warning: ambiguous first argument; put parentheses or a space even after `/' operator<commit_after>require 'test_helper'

class NameErrorHandlingTest < ActionDispatch::IntegrationTest
  setup do
    aamine = Author.create! name: 'aamine'
    @rhg = aamine.books.create! title: 'RHG'
  end

  test 'raising NameError in a decorator' do
    err = assert_raises ActionView::Template::Error do
      visit "/authors/#{@rhg.author.id}/books/#{@rhg.id}/errata"
    end

    assert_match(/undefined local variable or method `poof!` for/, err.message)
  end
end
{'fraction_non_alphanumeric': 0.11218568665377177, 'fraction_numerical': 0.0, 'mean_word_length': 4.098522167487685, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4542970', 'n_tokens_mistral': 336, 'n_tokens_neox': 324, 'n_words': 91}