Sha256: 6f58b4e2cfbaf33beb9b2112a86fb13f0b65b5fc88df530294929215b5b9f232

Contents?: true

Size: 437 Bytes

Versions: 10

Compression:

Stored size: 437 Bytes

Contents

require 'teststrap'

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

  asserts("result has a value") do
    Riot::Assertion.new("foo", topic) { "foo" }.exists
  end

  asserts("empty string is considered a value") do
    Riot::Assertion.new("foo", topic) { "" }.exists
  end

  should "raise a Failure if value is nil" do
    Riot::Assertion.new("foo", topic) { nil }.exists
  end.kind_of(Riot::Failure)
end # nil assertion

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
riot-0.9.12 test/assertion_macros/assertion_macro_exists_test.rb
riot-0.9.11 test/assertion_macros/assertion_macro_exists_test.rb
riot-0.9.10 test/assertion_macros/assertion_macro_exists_test.rb
riot-0.9.9 test/assertion_macros/assertion_macro_exists_test.rb
riot-0.9.8 test/assertion_macros/assertion_macro_exists_test.rb
riot-0.9.7 test/assertion_macros/assertion_macro_exists_test.rb
riot-0.9.6 test/assertion_macros/assertion_macro_exists_test.rb
riot-0.9.5 test/assertion_macros/assertion_macro_exists_test.rb
riot-0.9.4 test/assertion_macros/assertion_macro_exists_test.rb
riot-0.9.3 test/assertion_macro_exists_test.rb