Sha256: 4f849e14df4f76c9b4565351939af995ae696afdcfbb6dc7982c06699a3a6d3e

Contents?: true

Size: 470 Bytes

Versions: 8

Compression:

Stored size: 470 Bytes

Contents

require_relative "../cases/helper"

class ErrorsTest < ActiveRecord::TestCase
  def test_can_be_instantiated_with_no_args
    base = ActiveRecord::ActiveRecordError
    error_klasses = ObjectSpace.each_object(Class).select { |klass| klass < base }

    error_klasses.each do |error_klass|
      begin
        error_klass.new.inspect
      rescue ArgumentError
        raise "Instance of #{error_klass} can't be initialized with no arguments"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ibm_db-5.2.0 test/cases/errors_test.rb
ibm_db-5.1.0 test/cases/errors_test.rb
ibm_db-5.0.5 test/cases/errors_test.rb
ibm_db-5.0.4 test/cases/errors_test.rb
ibm_db-5.0.3 test/cases/errors_test.rb
ibm_db-5.0.2 test/cases/errors_test.rb
ibm_db-4.0.0-x86-mingw32 test/cases/errors_test.rb
ibm_db-4.0.0 test/cases/errors_test.rb