Sha256: 63bcb6463836ede415208486e8edb7e93e97e895ac7990157e1bddfa2b56f62f

Contents?: true

Size: 834 Bytes

Versions: 4

Compression:

Stored size: 834 Bytes

Contents

require 'abstract_unit'

class DeprecatedBaseMethodsTest < Test::Unit::TestCase
  class Target < ActionController::Base
    def home_url(greeting)
      "http://example.com/#{greeting}"
    end

    def raises_name_error
      this_method_doesnt_exist
    end

    def rescue_action(e) raise e end
  end

  def setup
    @request    = ActionController::TestRequest.new
    @response   = ActionController::TestResponse.new
    @controller = Target.new
  end

  def test_log_error_silences_deprecation_warnings
    get :raises_name_error
  rescue => e
    assert_not_deprecated { @controller.send :log_error, e }
  end

  def test_assertion_failed_error_silences_deprecation_warnings
    get :raises_name_error
  rescue => e
    error = Test::Unit::Error.new('testing ur doodz', e)
    assert_not_deprecated { error.message }
  end
end

Version data entries

4 entries across 3 versions & 2 rubygems

Version Path
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/actionpack/pkg/actionpack-2.2.2/test/controller/deprecation/deprecated_base_methods_test.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb
actionpack-2.2.3 test/controller/deprecation/deprecated_base_methods_test.rb
actionpack-2.2.2 test/controller/deprecation/deprecated_base_methods_test.rb