1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activemodel/test/cases/lint_test.rb

27 lines
444 B
Ruby
Raw Normal View History

2009-08-29 02:49:18 -04:00
require "cases/helper"
class LintTest < ActiveModel::TestCase
include ActiveModel::Lint::Tests
class CompliantModel
2009-08-29 02:49:18 -04:00
def to_model
self
end
2009-08-29 02:49:18 -04:00
def valid?() true end
def new_record?() true end
def destroyed?() true end
2009-08-29 02:49:18 -04:00
def errors
obj = Object.new
def obj.[](key) [] end
def obj.full_messages() [] end
obj
end
end
def setup
@model = CompliantModel.new
2009-08-29 02:49:18 -04:00
end
2009-09-25 01:56:20 -04:00
end