Sha256: e904d631b3187b83f4d3092ff86fe69a30c352e67d67dcfc55f460a76f0f340d

Contents?: true

Size: 886 Bytes

Versions: 13

Compression:

Stored size: 886 Bytes

Contents

require 'tap/test/utils'

module Tap
  module Test
    module Assertions
      def assert_output_equal(a, b, msg=nil)
        a = a[1..-1] if a[0] == ?\n
        if a == b
          assert true
        else
          flunk %Q{
#{msg}
==================== expected output ====================
#{Utils.whitespace_escape(a)}
======================== but was ========================
#{Utils.whitespace_escape(b)}
=========================================================
}
        end
      end

      def assert_alike(a, b, msg=nil)
        if b =~ a
          assert true
        else
          flunk %Q{
#{msg}
================= expected output like ==================
#{Utils.whitespace_escape(a)}
======================== but was ========================
#{Utils.whitespace_escape(b)}
=========================================================
}
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
bahuvrihi-tap-0.10.7 lib/tap/test/assertions.rb
bahuvrihi-tap-0.10.8 lib/tap/test/assertions.rb
bahuvrihi-tap-0.11.0 lib/tap/test/assertions.rb
bahuvrihi-tap-0.11.1 lib/tap/test/assertions.rb
bahuvrihi-tap-0.11.2 lib/tap/test/assertions.rb
bahuvrihi-tap-0.12.0 lib/tap/test/assertions.rb
tap-0.12.4 lib/tap/test/assertions.rb
tap-0.12.2 lib/tap/test/assertions.rb
tap-0.11.1 lib/tap/test/assertions.rb
tap-0.12.1 lib/tap/test/assertions.rb
tap-0.12.3 lib/tap/test/assertions.rb
tap-0.12.0 lib/tap/test/assertions.rb
tap-0.11.0 lib/tap/test/assertions.rb