Sha256: 5338ad4ac37d00a1c89ecb00b5be0f1d638018c1f0aa20c21eb971d7421ff942
Contents?: true
Size: 710 Bytes
Versions: 7
Compression:
Stored size: 710 Bytes
Contents
require 'rspec' RSpec::Matchers.define :have_directory do |*names| match do |directory| directory.join(*names).directory? end end RSpec::Matchers.define :have_file do |*names| match do |directory| directory.join(*names).file? end end RSpec::Matchers.define :have_executable do |*names| match do |directory| path = directory.join(*names) path.file? && path.executable? end end RSpec::Matchers.define :have_dependency do |name| match do |gemspec| gemspec.dependencies.any? { |dep| dep.name == name } end end RSpec::Matchers.define :have_development_dependency do |name| match do |gemspec| gemspec.development_dependencies.any? { |dep| dep.name == name } end end
Version data entries
7 entries across 7 versions & 1 rubygems