Sha256: 9b4d28d2b722d6f36a05c3af2c38e356a0f4d0df3a169a925235c23c7b1a55a6

Contents?: true

Size: 745 Bytes

Versions: 1

Compression:

Stored size: 745 Bytes

Contents

require 'ratch/shell'

KO.case 'Shell' do

  test 'with no path given current working directory is used' do
    sh = Ratch::Shell.new
    sh.work == Pathname.new(Dir.pwd)
  end

  test :quiet? do |options|
    o = Hash[*options]
    sh = Ratch::Shell.new(o)
    sh.quiet?
  end

  ok [:quiet, true]

  test :trace? do |options|
    o = Hash[*options]
    sh = Ratch::Shell.new(o)
    sh.trace?
  end

  ok [:trace, true]

  test :noop? do |options|
    o = Hash[*options]
    sh = Ratch::Shell.new(o)
    sh.noop?
  end

  ok [:noop, true]

  test :dryrun? do |options|
    o = Hash[*options]
    sh = Ratch::Shell.new(o)
    sh.dryrun?
  end

  ok [:noop, true, :trace, true]
  ok [:dryrun, true]

  no [:noop, true]
  no [:verbose, true]

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ratch-1.2.0 test/case_shell.rb