spec/fixtures/tasks.rb in action_logic-0.1.0 vs spec/fixtures/tasks.rb in action_logic-0.2.0
- old
+ new
@@ -20,11 +20,11 @@
end
class ValidateAroundCustomTypeTestTask
include ActionLogic::ActionTask
- validates_around :custom_type => { :type => :customtype1, :presence => true }
+ validates_around :custom_type => { :type => CustomType1, :presence => true }
def call
end
end
@@ -69,11 +69,11 @@
end
class ValidateBeforeCustomTypeTestTask
include ActionLogic::ActionTask
- validates_before :custom_type => { :type => :customtype1, :presence => true }
+ validates_before :custom_type => { :type => CustomType1, :presence => true }
def call
end
end
@@ -115,11 +115,11 @@
def call
context.integer_test = 1
context.float_test = 1.0
context.string_test = "string"
- context.bool_test = false
+ context.bool_test = true
context.hash_test = {}
context.array_test = []
context.symbol_test = :symbol
context.nil_test = nil
end
@@ -152,20 +152,20 @@
end
class ValidateAfterCustomTypeTestTask
include ActionLogic::ActionTask
- validates_after :custom_type => { :type => :customtype1, :presence => true }
+ validates_after :custom_type => { :type => CustomType1, :presence => true }
def call
context.custom_type = CustomType1.new
end
end
class ValidateAfterInvalidCustomTypeTestTask
include ActionLogic::ActionTask
- validates_after :custom_type => { :type => :customtype2, :presence => true }
+ validates_after :custom_type => { :type => CustomType2, :presence => true }
def call
context.custom_type = CustomType1.new
end
end