Sha256: ade15d8a010ddfb5063139f05c25b453212adf060ce112d19ffde1259543a920

Contents?: true

Size: 788 Bytes

Versions: 2

Compression:

Stored size: 788 Bytes

Contents

covers 'assay/respond_assay'

testcase RespondAssay do

  class_method :pass? do

    test do
      assert RespondAssay.pass?(:symbol, :to_s)
      refute RespondAssay.pass?(:symbol, :no_method)
    end

  end

  class_method :fail? do

    test do
      refute RespondAssay.fail?(:symbol, :to_s)
      assert RespondAssay.fail?(:symbol, :no_method)
    end

  end

  class_method :assert! do

    test do
      RespondAssay.assert!(:symbol, :to_s)
    end

    test do
      expect RespondAssay do
        RespondAssay.assert!(:symbol, :no_method)
      end
    end

  end

  class_method :refute! do

    test do
      RespondAssay.refute!(:symbol, :no_method)
    end

    test do
      expect RespondAssay do
        RespondAssay.refute!(:symbol, :to_s)
      end
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
assay-0.4.1 test/case_respond_assay.rb
assay-0.4.0 test/case_respond_assay.rb