Sha256: d8840b4a494d09db15e20d182b5b192722fc678622045cdd62f9eefc3afcf755

Contents?: true

Size: 467 Bytes

Versions: 2

Compression:

Stored size: 467 Bytes

Contents

# frozen_string_literal: true
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 method `poof!` for/, err.message)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_decorator-0.9.0 test/features/name_error_handling_test.rb
active_decorator-0.8.0 test/features/name_error_handling_test.rb