Sha256: ca0670df1f03e5eba2c3d87f404077cf88471128d97ef635101e3c2d69fedcc0

Contents?: true

Size: 800 Bytes

Versions: 1

Compression:

Stored size: 800 Bytes

Contents

TRYOUTS_HOME = File.expand_path(File.join(File.dirname(__FILE__), ".."))
MOCKOUT_PATH = File.join(TRYOUTS_HOME, "bin", "mockout")

group "mockout cli"
command :mockout, MOCKOUT_PATH

tryout "Common Usage" do
  drill  "No Command"
  drill     "No args",            :info
  drill "YAML Output", :f, :yaml, :info
  drill "JSON Output", :f, :json, :info
end

tryout "inline dream that passes", :cli, :mockout do
  output = ["we expect mockout to", "echo these lines back"]

  # $ bin/mockout sergeant -e "we expect mockout to" "echo these lines back"
  drill "echo arguments", :info, :e, output[0], output[1]
  dream "echo arguments", output
end

tryout "inline dream that fails", :cli, :mockout do
  dream "echo arguments", "The dream does"
  drill "echo arguments", :info, :e, "not match reality"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tryouts-0.4.0 tryouts/mockoutcli_tryouts.rb