Sha256: 3d67c2287051e60e114310c8c750ab9d42a3f549db369d0b08485e0476706eb4

Contents?: true

Size: 608 Bytes

Versions: 1

Compression:

Stored size: 608 Bytes

Contents

#!/usr/bin/env ruby -w

require_relative 'app'

# require 'spectus'
require_relative '../../lib/spectus'

extend Spectus::DSL

expectation_1 = expect { @app.swims  }.to capture_stderr: " ...\n"
expectation_2 = expect { @app.quacks }.to capture_stdout: "Quaaaaaack!\n"
expectation_3 = expect { @app.speaks }.to raise_exception: NoMethodError
expectation_4 = expect { @app.walks  }.to eql: "Quaaa... Klop klop!"

case (expectation_1 == true &&
      expectation_2 == true &&
      expectation_3 == true &&
      expectation_4 == true)
  when true then puts "I call that #{@app} a duck."
  else warn 'WAT?'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spectus-1.0.0 example/duck/test.rb