Sha256: 1516514423cc8df7385031c628259359f546a3cfb86c7b30e8f5a56868a0fa12

Contents?: true

Size: 850 Bytes

Versions: 4

Compression:

Stored size: 850 Bytes

Contents

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

group "CLI"
command :mockout, MOCKOUT_PATH

tryout "Mockouts", :cli do
  
  # This fails. Rye problem?
  dream :class, Array
  dream []
  drill "No args"
  
  dream ["One line of content"]
  drill "can echo single argument", :echo, "One line of content"
  
  dream ["Two lines", "of content"]
  drill "can echo single argument with line break", :echo, "Two lines#{$/}of content"
  
  dream :grep, /UTC/
  drill "can display date", :date
  
  dream []
  drill "can be quiet", :q, :test
  
  dream ["PASS"]
  drill "can execute via a block" do
    mockout :test, :p
  end
  
  dream :match, /\d+\.\d+\.\d+\.\d+/
  drill "can execute a block of commands" do
    ret = rudy :q, :myaddress, :e
    ret.first
  end
  
end


Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
delano-tryouts-0.8.0 tryouts/20_cli_tryouts.rb
delano-tryouts-0.8.1 tryouts/20_cli_tryouts.rb
tryouts-0.8.0 tryouts/20_cli_tryouts.rb
tryouts-0.8.1 tryouts/20_cli_tryouts.rb