Implement `file_contains' condition keyword
This commit is contained in:
1 parent
05331d334d
commit
a0482d175c
7 files changed
+100
-4
No files matched your search
@@ -0,0 +1,18 @@
|
||||
module Producer
|
||||
module Core
|
||||
module Tests
|
||||
class FileContains < Test
|
||||
def verify
|
||||
content = file_content
|
||||
content ? content.include?(arguments[1]) : false
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def file_content
|
||||
fs.file_read(arguments[0])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user