Sha256: 8acc3dd9b4f8e2e874238128f466e58eb000cb463a91625610d69835b85267b2
Contents?: true
Size: 1006 Bytes
Versions: 13
Compression:
Stored size: 1006 Bytes
Contents
module Woulda module EnumerationsMixin module Macros def should_act_as_enumerated(options = {}) klass = model_class should_have_db_columns :name should "define Enumerated macro methods" do class_modules = (class << klass; included_modules; end) assert class_modules.include?(ActiveRecord::Acts::Enumerated::MacroMethods), "#{klass} doesn't define Enumerated macro methods" end should "define Enumerated class methods" do class_modules = (class << klass; included_modules; end) assert class_modules.include?(ActiveRecord::Acts::Enumerated::ClassMethods), "#{klass} doesn't define Enumerated class methods" end should "define Enumerated instance methods" do instance_modules = klass.included_modules assert instance_modules.include?(ActiveRecord::Acts::Enumerated::InstanceMethods), "#{klass} doesn't define Enumerated instance methods" end end end end end
Version data entries
13 entries across 13 versions & 3 rubygems