Sha256: a9452000eed1cd4f4adce897da4f9f951d30ffec0a59076d041bd56b19ba9594

Contents?: true

Size: 506 Bytes

Versions: 10

Compression:

Stored size: 506 Bytes

Contents

require 'teststrap'

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

  asserts "result matches expression" do
    Riot::Assertion.new("foo", topic) { "a" }.matches(%r[.])
  end.equals(0)

  should "raise a Failure if result does not match" do
    Riot::Assertion.new("foo", topic) { "" }.matches(%r[.])
  end.kind_of(Riot::Failure)

  should "return the result of a matching operation" do
    Riot::Assertion.new("foo", topic) { "a" }.matches("a")
  end.equals(0)
end # maching assertion

Version data entries

10 entries across 10 versions & 1 rubygems

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