Sha256: 9cb2925c3bedb37c32ab7331230c4a424b8d9471fa84fea69968f1f644d0ec40

Contents?: true

Size: 527 Bytes

Versions: 10

Compression:

Stored size: 527 Bytes

Contents

module Riot
  # Asserts that the result of the test equals the expected value. Using the +==+ operator to assert
  # equality.
  #   asserts("test") { "foo" }.equals("foo")
  #   should("test") { "foo" }.equals("foo")
  #   asserts("test") { "foo" }.equals { "foo" }
  class EqualsMacro < AssertionMacro
    register :equals

    def evaluate(actual, expected)
      if expected == actual
        pass new_message.is_equal_to(expected)
      else
        fail expected_message(expected).not(actual)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
riot-0.11.4 lib/riot/assertion_macros/equals.rb
riot-0.11.4.pre lib/riot/assertion_macros/equals.rb
riot-0.11.3 lib/riot/assertion_macros/equals.rb
riot-0.11.2 lib/riot/assertion_macros/equals.rb
riot-0.11.1 lib/riot/assertion_macros/equals.rb
riot-0.11.0 lib/riot/assertion_macros/equals.rb
riot-0.10.13 lib/riot/assertion_macros/equals.rb
riot-0.10.13.pre lib/riot/assertion_macros/equals.rb
riot-0.10.12 lib/riot/assertion_macros/equals.rb
riot-0.10.12.pre lib/riot/assertion_macros/equals.rb