Sha256: 33eb98a2c1d3daf8ae85fcc549999275a22d0a44e0a75030741f313f2f23eab5
Contents?: true
Size: 817 Bytes
Versions: 2
Compression:
Stored size: 817 Bytes
Contents
module AktionTest module Matchers module FileSystem def be_a_directory DirectoryExistanceMatcher.new end class DirectoryExistanceMatcher < Matchers::Base def initialize end def matches?(subject) @subject = subject directory_exists? end protected def expectation "#{@subject} to be a directory." end def problem if File.exists? @subject unless File.directory? @subject "#{@subject} is not a directory." else "Unknown" end else "#{@subject} does not exist." end end def directory_exists? Dir.exists? @subject end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aktion_test-0.1.2 | lib/aktion_test/matchers/file_system/be_a_directory.rb |
aktion_test-0.1.1 | lib/aktion_test/matchers/file_system/be_a_directory.rb |