Sha256: 0c5b9a83dfb1a1d9aafa4941dfdbaaf9f226baa6724c50a8028f11d81f9287b2

Contents?: true

Size: 443 Bytes

Versions: 18

Compression:

Stored size: 443 Bytes

Contents

RSpec::Matchers.define :be_writable do
  match do |file|
    if file.respond_to?(:writable?)
      file.writable?(@by_whom, @by_user)
    else
      if @by_user != nil
        backend.check_access_by_user(example, file, @by_user, 'w')
      else
        backend.check_writable(example, file, @by_whom)
      end
    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

18 entries across 18 versions & 1 rubygems

Version Path
serverspec-0.5.3 lib/serverspec/matchers/be_writable.rb
serverspec-0.5.2 lib/serverspec/matchers/be_writable.rb
serverspec-0.5.1 lib/serverspec/matchers/be_writable.rb
serverspec-0.5.0 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.14 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.13 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.12 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.11 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.10 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.9 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.8 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.7 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.6 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.5 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.4 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.3 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.2 lib/serverspec/matchers/be_writable.rb
serverspec-0.4.1 lib/serverspec/matchers/be_writable.rb