Sha256: d85799f8d5c64c4fde694051901aa89ff6878025e16a7802071c0b804e6f4f33

Contents?: true

Size: 387 Bytes

Versions: 17

Compression:

Stored size: 387 Bytes

Contents

module FileExistMatcher
  def exist(name)
    FileExistMatcher.new(name)
  end

  class FileExistMatcher
    def initialize(name)
      @name = name
    end

    def matches?(what)
      what.exist?(@name)
    end

    def failure_message
      "Expected file '#{@name}' to exist"
    end

    def negative_failure_message
      "Expected file '#{@name}' to not exist"
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
jax-1.1.1 spec/support/file_exist_matcher.rb
jax-1.1.0 spec/support/file_exist_matcher.rb
jax-1.1.0.rc1 spec/support/file_exist_matcher.rb
jax-1.0.1 spec/support/file_exist_matcher.rb
jax-1.0.1.rc2 spec/support/file_exist_matcher.rb
jax-1.0.1.rc1 spec/support/file_exist_matcher.rb
jax-1.0.0 spec/support/file_exist_matcher.rb
jax-0.0.0.10 spec/support/file_exist_matcher.rb
jax-0.0.0.9 spec/support/file_exist_matcher.rb
jax-0.0.0.8 spec/support/file_exist_matcher.rb
jax-0.0.0.7 spec/support/file_exist_matcher.rb
jax-0.0.0.6 spec/support/file_exist_matcher.rb
jax-0.0.0.5 spec/support/file_exist_matcher.rb
jax-0.0.0.4 spec/support/file_exist_matcher.rb
jax-0.0.0.3 spec/support/file_exist_matcher.rb
jax-0.0.0.2 spec/support/file_exist_matcher.rb
jax-0.0.0.1 spec/support/file_exist_matcher.rb