Sha256: e94e7d26daddc2f85ed7fd973bed9b18a7c9654fafa6d9c14fee8979f0486a64

Contents?: true

Size: 478 Bytes

Versions: 2

Compression:

Stored size: 478 Bytes

Contents

shared_examples_for :it_can_make_assertions do
  describe '#assert' do
    it 'returns true if the condition is truthy' do
      expect(subject.send(:assert, true, "Shouldn't see this message")).to eq true
    end

    it 'raises a Kookaburra::AssertionFailed exception if the condition is not truthy' do
      expect{ subject.send(:assert, false, "False isn't true, dummy.") }.to \
        raise_error(Kookaburra::AssertionFailed, "False isn't true, dummy.")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kookaburra-3.0.1 spec/support/shared_examples/it_can_make_assertions.rb
kookaburra-3.0.0 spec/support/shared_examples/it_can_make_assertions.rb