module TestHelper::ObjectMixin

Public Instance Methods

flag_test(title=nil) click to toggle source
# File lib/testhelper.rb, line 45
def flag_test(title=nil)
    location_str = caller()[0]
    puts("\n"+location_str)
    if title == nil
        title = "" 
    else
        title = title+" : " 
    end
    puts(title+"There are test codes in this place!")
    self
end
ppt(title=nil) click to toggle source
# File lib/testhelper.rb, line 26
def ppt(title=nil)
    location_str = caller()[0]
    if title == nil
        title = SourceFile.get_variable_name(location_str, __callee__)
    end
    puts("#{title} :")
    pp(self)
    self
end
Also aliased as: pretty_print_with_title
pptl(title=nil) click to toggle source
# File lib/testhelper.rb, line 35
def pptl(title=nil)
    location_str = caller()[0]
    puts("\n"+location_str)
    if title == nil
        title = SourceFile.get_variable_name(location_str, __callee__)
    end
    puts("#{title} : ")
    pp(self)
    self
end
pretty_print_with_title(title=nil)
Alias for: ppt
pretty_print_with_title_lineno(title=nil)
Alias for: pptl
pt(title=nil) click to toggle source

It will pretty print the self, with title.

# File lib/testhelper.rb, line 9
def pt(title=nil)
    location_str = caller()[0]
    if title == nil
        title = SourceFile.get_variable_name(location_str, __callee__)
    end
    puts("#{title} : #{self.inspect()}")
    self
end
Also aliased as: puts_with_title
ptl(title=nil) click to toggle source
# File lib/testhelper.rb, line 17
def ptl(title=nil)
    location_str = caller()[0]
    puts("\n"+location_str)
    if title == nil
        title = SourceFile.get_variable_name(location_str, __callee__)
    end
    puts("#{title} : #{self.inspect()}")
    self
end
Also aliased as: puts_with_title_lineno
puts_with_title(title=nil)
Alias for: pt
puts_with_title_lineno(title=nil)
Alias for: ptl