Implement `has_file' condition keyword
This commit is contained in:
1 parent
3492382968
commit
2cbe1726f7
7 files changed
+69
-2
No files matched your search
@@ -16,7 +16,8 @@ module Producer
|
||||
end
|
||||
end
|
||||
|
||||
define_test :has_env, Tests::HasEnv
|
||||
define_test :has_env, Tests::HasEnv
|
||||
define_test :has_file, Tests::HasFile
|
||||
|
||||
attr_accessor :tests
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
module Producer
|
||||
module Core
|
||||
module Tests
|
||||
class HasFile < Test
|
||||
def success?
|
||||
env.remote.fs.has_file? arguments.first
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user