class PublicanCreatorsTest
Class for methods in testing environment
Public Class Methods
check_content(file, pattern)
click to toggle source
Method for checking file content @param [String] file can be any file @param [String] pattern is the searchpattern @return [String] result
# File lib/publican_creators/testlib.rb, line 25 def self.check_content(file, pattern) f = File.new(file) text = f.read result = 'false' # Default false result = 'true' if text =~ /"#{pattern}"/ # if found true return result end
cleanup()
click to toggle source
Method for cleanup the test results
# File lib/publican_creators/testlib.rb, line 34 def self.cleanup system('rm -rf The_holy_Bible*') end