Class: TestBelt::Matchers::HaveFiles::Matcher
- Defined in:
- lib/test_belt/matchers/have_files.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #desc ⇒ Object
-
#initialize(file_path) ⇒ Matcher
constructor
A new instance of Matcher.
- #test ⇒ Object
Constructor Details
#initialize(file_path) ⇒ Matcher
Returns a new instance of Matcher.
20 21 22 |
# File 'lib/test_belt/matchers/have_files.rb', line 20 def initialize(file_path) @file_path = file_path end |
Instance Method Details
#desc ⇒ Object
24 25 26 |
# File 'lib/test_belt/matchers/have_files.rb', line 24 def desc "have the file path '#{@file_path}'" end |
#test ⇒ Object
28 29 30 31 32 |
# File 'lib/test_belt/matchers/have_files.rb', line 28 def test using(@file_path) do |path| assert File.exists?(path), "'#{path}' does not exist" end end |