lib/assert/macros/methods.rb in assert-0.8.0 vs lib/assert/macros/methods.rb in assert-0.8.1
- old
+ new
@@ -19,10 +19,12 @@
end
end
end
end
alias_method :have_instance_methods, :have_instance_method
+ alias_method :have_imeth, :have_instance_method
+ alias_method :have_imeths, :have_instance_method
def not_have_instance_method(*methods)
called_from = (methods.last.kind_of?(Array) ? methods.pop : caller).first
name = "not have instance methods: #{methods.map{|m| "'#{m}'"}.join(', ')}"
Assert::Macro.new(name) do
@@ -32,10 +34,12 @@
end
end
end
end
alias_method :not_have_instance_methods, :not_have_instance_method
+ alias_method :not_have_imeth, :not_have_instance_method
+ alias_method :not_have_imeths, :not_have_instance_method
def have_class_method(*methods)
called_from = (methods.last.kind_of?(Array) ? methods.pop : caller).first
name = "have class methods: #{methods.map{|m| "'#{m}'"}.join(', ')}"
Assert::Macro.new(name) do
@@ -45,10 +49,12 @@
end
end
end
end
alias_method :have_class_methods, :have_class_method
+ alias_method :have_cmeth, :have_class_method
+ alias_method :have_cmeths, :have_class_method
def not_have_class_method(*methods)
called_from = (methods.last.kind_of?(Array) ? methods.pop : caller).first
name = "not have class methods: #{methods.map{|m| "'#{m}'"}.join(', ')}"
Assert::Macro.new(name) do
@@ -58,9 +64,11 @@
end
end
end
end
alias_method :not_have_class_methods, :not_have_class_method
+ alias_method :not_have_cmeth, :not_have_class_method
+ alias_method :not_have_cmeths, :not_have_class_method
def have_reader(*methods)
methods << caller if !methods.last.kind_of?(Array)
have_instance_methods(*methods)
end