Sha256: fdedf723356365905a25f0c4a3f5403d98d5a5f92a9f4873bb6ecc1ea5677df0

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

require_relative "expectation"
require_relative "step"

module Linepipe
  module DSL
    def setup(&block)
      @setup = block
    end

    def data(data=nil, &block)
      @data = data ? -> { data } : block
    end

    def step(name=nil, &block)
      @steps << Step.new(name, &block)
    end

    def expect(msg=nil, &block)
      @expectations << Expectation.new(msg, method(:log), &block)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
linepipe-0.1.2 lib/linepipe/dsl.rb