Sha256: ece8cc7bcdc37c974e011d6cc8d187aef1db8310c64feb69d378afb752b99f81

Contents?: true

Size: 429 Bytes

Versions: 18

Compression:

Stored size: 429 Bytes

Contents

RSpec::Matchers.define :be_a_directory do
  match do |actual|
    File.directory? actual.to_s
  end
end

RSpec::Matchers.define :be_a_file do
  match do |actual|
    File.file? actual.to_s
  end
end

RSpec::Matchers.define :have_the_content do |expected|
  match do |actual|
    File.read(actual.to_s) == expected
  end
end

RSpec::Matchers.define :be_executable do
  match do |actual|
    File.executable? actual.to_s
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cany-0.5.7 spec/support/file_matchers.rb
cany-0.5.6 spec/support/file_matchers.rb
cany-0.5.5 spec/support/file_matchers.rb
cany-0.5.4 spec/support/file_matchers.rb
cany-0.5.3 spec/support/file_matchers.rb
cany-0.5.2 spec/support/file_matchers.rb
cany-0.5.1 spec/support/file_matchers.rb
cany-0.5.0 spec/support/file_matchers.rb
cany-0.4.0 spec/support/file_matchers.rb
cany-0.3.0 spec/support/file_matchers.rb
cany-0.2.1 spec/support/file_matchers.rb
cany-0.2.0 spec/support/file_matchers.rb
cany-0.1.3 spec/support/file_matchers.rb
cany-0.1.2 spec/support/file_matchers.rb
cany-0.1.1 spec/support/file_matchers.rb
cany-0.1.0 spec/support/file_matchers.rb
cany-0.0.2 spec/support/file_matchers.rb
cany-0.0.1 spec/support/file_matchers.rb