class Lemon::TestClassMethod

Subclass of TestMethod used for class methods. It's basically the same class.

Public Instance Methods

class_method?() click to toggle source
# File lib/lemon/test_class_method.rb, line 39
def class_method?
  true
end
name() click to toggle source

If class method, returns target method's name prefixed with double colons. If instance method, then returns target method's name prefixed with hash character.

# File lib/lemon/test_class_method.rb, line 18
def name
  "::#{target}"
end
target_class() click to toggle source

For a class method, the target class is the meta-class.

# File lib/lemon/test_class_method.rb, line 34
def target_class
  @target_class ||= (class << context.target; self; end)
end
to_s() click to toggle source

Returns the prefixed method name.

# File lib/lemon/test_class_method.rb, line 23
def to_s
  "::#{target}"
end
type() click to toggle source

Description of the type of test case.

# File lib/lemon/test_class_method.rb, line 11
def type
  'Class Method'
end
unit() click to toggle source

Returns the fully qulaified name of the target method. This is the standard interface used by RubyTest.

# File lib/lemon/test_class_method.rb, line 29
def unit
  "#{context}.#{target}"
end