Module: AktionTest::Matchers::FileSystem::DirectoryContains
- Defined in:
- lib/aktion_test/matchers/file_system/directory_contains.rb
Defined Under Namespace
Classes: Matcher
Instance Method Summary collapse
Instance Method Details
#have_file(path) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/aktion_test/matchers/file_system/directory_contains.rb', line 5 def have_file(path) segments = path.split('/') file = segments.pop tree = segments.reverse.reduce([file]) {|a,b| [{b => a}] } have_tree(tree) end |