Total Complexity | 3 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | # Testing Module for PublicanCreators |
||
13 | class PublicanCreatorsTest |
||
14 | # Method for checking file content |
||
15 | # @param [String] file can be any file |
||
16 | # @param [String] pattern is the searchpattern |
||
17 | # @return [String] result |
||
18 | def self.check_content(file, pattern) |
||
19 | f = File.new(file) |
||
20 | text = f.read |
||
21 | result = 'false' # Default false |
||
22 | result = 'true' if text =~ /"#{pattern}"/ # if found true |
||
23 | return result |
||
24 | end |
||
25 | |||
26 | # Method for cleanup the test results |
||
27 | def self.cleanup |
||
28 | system('rm -rf The_holy_Bible*') |
||
29 | end |
||
30 | end |
||
31 |