Sha256: 9de419f407e86c8c8cd46e38d14280bc367d9d180230403b28b1f50fa1e8c791

Contents?: true

Size: 686 Bytes

Versions: 29

Compression:

Stored size: 686 Bytes

Contents

module Spec
  module Matchers
    module SpecExtensions
      class HaveFile < SpecExtensionsBase
        def initialize(expected,extra="")
          @expected = expected
          @extra = extra
        end
        def matches?(target)
          @target = target
          is_present?
        end
        def failure_message
          "expected #{@target.inspect} to have file #{@expected}"
        end
        def negative_failure_message
          "expected #{@target.inspect} not to have file #{@expected}"
        end
        def type
          "file"
        end
      end
    end
    def have_file(name, extra="")
      SpecExtensions::HaveFile.new(name, extra)
    end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
auser-poolparty-1.1.3 lib/poolparty/spec/matchers/have_file.rb
auser-poolparty-1.1.4 lib/poolparty/spec/matchers/have_file.rb
auser-poolparty-1.1.5 lib/poolparty/spec/matchers/have_file.rb
auser-poolparty-1.1.6 lib/poolparty/spec/matchers/have_file.rb
auser-poolparty-1.1.7 lib/poolparty/spec/matchers/have_file.rb
fairchild-poolparty-1.1.3 lib/poolparty/spec/matchers/have_file.rb
fairchild-poolparty-1.1.4 lib/poolparty/spec/matchers/have_file.rb
fairchild-poolparty-1.1.5 lib/poolparty/spec/matchers/have_file.rb
poolparty-0.2.84 lib/poolparty/spec/matchers/have_file.rb