1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
require 'cases/helper' class ModelTest < ActiveModel::TestCase include ActiveModel::Lint::Tests class BasicModel include ActiveModel::Model attr_accessor :attr end def setup @model = BasicModel.new end def test_initialize_with_params object = BasicModel.new(:attr => "value") assert_equal object.attr, "value" end end