Sha256: 92f00109f88bef36d5e0d43f4d51205999ca092a57f44a911eb7b1909c3f7616

Contents?: true

Size: 392 Bytes

Versions: 2

Compression:

Stored size: 392 Bytes

Contents

require 'spec_helper'

describe Must, "boolean" do
  def ok(&block)
    block.should_not raise_error
  end

  def ng(error = Must::Invalid, &block)
    block.should raise_error(error)
  end

  specify do
    ok { true.must(Boolean) }
    ok { false.must(Boolean) }

    ng { nil.must(Boolean) }
    ng { 1.must(Boolean) }
    ng { "".must(Boolean) }
    ng { [true].must(Boolean) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
must-0.3.3 spec/boolean_spec.rb
must-0.3.2 spec/boolean_spec.rb