Sha256: bbe4b3e308a2d8b16b98708f785639922f7d482cecbe9c682b48349fa64df0bb

Contents?: true

Size: 339 Bytes

Versions: 6

Compression:

Stored size: 339 Bytes

Contents

RSpec::Matchers.define :be_readable do
  match do |file|
    if @by_user != nil
      backend.check_access_by_user(example, file, @by_user, 'r')
    else
      backend.check_readable(example, file, @by_whom)
    end
  end
  chain :by do |by_whom|
    @by_whom = by_whom
  end
  chain :by_user do |by_user|
    @by_user = by_user
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
serverspec-0.4.0 lib/serverspec/matchers/be_readable.rb
serverspec-0.3.2 lib/serverspec/matchers/be_readable.rb
serverspec-0.3.1 lib/serverspec/matchers/be_readable.rb
serverspec-0.3.0 lib/serverspec/matchers/be_readable.rb
serverspec-0.2.28 lib/serverspec/matchers/be_readable.rb
serverspec-0.2.27 lib/serverspec/matchers/be_readable.rb