Top Level Namespace

Defined Under Namespace

Modules: Gemwork

Instance Method Summary collapse

Instance Method Details

#contextObject



21
# File 'lib/gemwork/test/support/spec_dsl.rb', line 21

def context(...) = describe(...)

#given(description) ⇒ Object

Use #given to setup the prerequisites/context of a set of test examples.

Examples:

describe "#<method_name>" do
  given "<condition>" do
    before { <setup condition here> }

    it "<result>" do
      _(subject.<method_name>).must_equal(<result>)
    end

    it ...
  end
end

# => <...Test>::#<method_name>::GIVEN <description>...


19
# File 'lib/gemwork/test/support/spec_dsl.rb', line 19

def given(description, ...) = describe("GIVEN #{description}", ...)