Sha256: 6a9c85fe7526ea45867ce310f22d2509aea642c876328625d4f81aace5d9ab13

Contents?: true

Size: 383 Bytes

Versions: 3

Compression:

Stored size: 383 Bytes

Contents

require 'teststrap'

context "A nil assertion macro" do
  setup { Riot::Situation.new }

  asserts(":pass when result is nil") do
    Riot::Assertion.new("foo") { nil }.nil.run(topic)
  end.equals([:pass, "is nil"])

  asserts(":fail with message") do
    Riot::Assertion.new("foo") { "a" }.nil.run(topic)
  end.equals([:fail, %Q{expected nil, not "a"}])
end # A nil assertion macro

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
riot-0.10.12.pre test/assertion_macros/nil_test.rb
riot-0.10.11 test/assertion_macros/nil_test.rb
riot-0.10.10 test/assertion_macros/nil_test.rb