Sha256: 1260e35252cd5b991eb571087c596351219cc95c39a332f7057115cde021a3aa

Contents?: true

Size: 451 Bytes

Versions: 18

Compression:

Stored size: 451 Bytes

Contents

RSpec::Matchers.define :be_executable do
  match do |file|
    if file.respond_to?(:executable?)
      file.executable?(@by_whom, @by_user)
    else
      if @by_user != nil
        backend.check_access_by_user(example, file, @by_user, 'x')
      else
        backend.check_executable(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_executable.rb
serverspec-0.5.2 lib/serverspec/matchers/be_executable.rb
serverspec-0.5.1 lib/serverspec/matchers/be_executable.rb
serverspec-0.5.0 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.14 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.13 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.12 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.11 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.10 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.9 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.8 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.7 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.6 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.5 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.4 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.3 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.2 lib/serverspec/matchers/be_executable.rb
serverspec-0.4.1 lib/serverspec/matchers/be_executable.rb