spec/fixtures/constants.rb in action_logic-0.1.0 vs spec/fixtures/constants.rb in action_logic-0.2.0

- old
+ new

@@ -1,16 +1,16 @@ require 'fixtures/custom_types' class Constants - ALL_VALIDATIONS = { :integer_test => { :type => :integer, :presence => true }, - :float_test => { :type => :float, :presence => true }, - :string_test => { :type => :string, :presence => true }, - :bool_test => { :type => :boolean, :presence => true }, - :hash_test => { :type => :hash, :presence => true }, - :array_test => { :type => :array, :presence => true }, - :symbol_test => { :type => :symbol, :presence => true }, - :nil_test => { :type => :nil } } + ALL_VALIDATIONS = { :integer_test => { :type => Fixnum, :presence => true }, + :float_test => { :type => Float, :presence => true }, + :string_test => { :type => String, :presence => true }, + :bool_test => { :type => TrueClass, :presence => true }, + :hash_test => { :type => Hash, :presence => true }, + :array_test => { :type => Array, :presence => true }, + :symbol_test => { :type => Symbol, :presence => true }, + :nil_test => { :type => NilClass } } INVALID_ATTRIBUTES = { :integer_test => nil, :float_test => nil, :string_test => nil, :bool_test => nil, @@ -26,14 +26,14 @@ :hash_test => {}, :array_test => [], :symbol_test => :symbol, :nil_test => nil } - CUSTOM_TYPE_VALIDATION1 = { :custom_type => { :type => :customtype1, :presence => true } } + CUSTOM_TYPE_VALIDATION1 = { :custom_type => { :type => CustomType1, :presence => true } } CUSTOM_TYPE_ATTRIBUTES1 = { :custom_type => CustomType1.new } - CUSTOM_TYPE_VALIDATION2 = { :custom_type => { :type => :customtype2, :presence => true } } + CUSTOM_TYPE_VALIDATION2 = { :custom_type => { :type => CustomType2, :presence => true } } CUSTOM_TYPE_ATTRIBUTES2 = { :custom_type => CustomType2.new } PRESENCE_VALIDATION = { :integer_test => { :presence => true } }