Sha256: 9adab7c0f859ee9a65261c8b1d7b90bcded54b922107b0448c6f033453ae573a

Contents?: true

Size: 511 Bytes

Versions: 22

Compression:

Stored size: 511 Bytes

Contents

# encoding: utf-8

# Checks if a file with given name is present in sandbox.
#
# @example
#   expect("some_file.rb").to be_present_in_sandbox
RSpec::Matchers.define :be_present_in_sandbox do
  match do |filename|
    files = Dir[File.join(sandbox, filename)]
    expect(files).to be_any
  end
end

# Checks if a file with given name is absent in sandbox.
#
# @example
#   expect("some_file.rb").to be_absent_in_sandbox
RSpec::Matchers.define_negated_matcher(
  :be_absent_in_sandbox,
  :be_present_in_sandbox
)

Version data entries

22 entries across 21 versions & 2 rubygems

Version Path
hexx-rspec-0.5.2 lib/hexx-rspec/initializers/sandbox/matchers.rb
hexx-rspec-0.5.1 lib/hexx-rspec/initializers/sandbox/matchers.rb
hexx-rspec-0.4.2 config/initializers/sandbox/matchers.rb
hexx-rspec-0.4.1 config/initializers/sandbox/matchers.rb
hexx-rspec-0.4.0 config/initializers/sandbox/matchers.rb
hexx-suit-1.5.0-x86_64-linux spec/support/sandbox/matchers.rb
hexx-rspec-0.3.1 config/initializers/sandbox/matchers.rb
hexx-rspec-0.3.0 config/initializers/sandbox/matchers.rb
hexx-rspec-0.2.2 config/initializers/sandbox/matchers.rb
hexx-rspec-0.2.1 config/initializers/sandbox/matchers.rb
hexx-rspec-0.2.0 config/initializers/sandbox/matchers.rb
hexx-rspec-0.2.0 spec/support/sandbox/matchers.rb
hexx-suit-1.3.0-x86_64-linux spec/support/sandbox/matchers.rb
hexx-suit-1.2.0 spec/support/sandbox/matchers.rb
hexx-rspec-0.1.0 spec/support/sandbox/matchers.rb
hexx-suit-1.0.0 spec/support/sandbox/matchers.rb
hexx-rspec-0.0.1 spec/support/sandbox/matchers.rb
hexx-suit-0.2.2 spec/support/sandbox/matchers.rb
hexx-suit-0.2.1 spec/support/sandbox/matchers.rb
hexx-suit-0.2.0 spec/support/sandbox/matchers.rb