Sha256: 7375a0704c502097a3d95dcdad725fa84efebc7b65831b28430ea84b8b193917

Contents?: true

Size: 664 Bytes

Versions: 10

Compression:

Stored size: 664 Bytes

Contents

#
# Testing rufus-verbs
#
# jmettraux@gmail.com
#
# Sun Jan 13 18:02:50 JST 2008
#

require 'items'


module TestBaseMixin

    def setup

        @server = ItemServer.new
        @server.start
    end

    def teardown

        @server.shutdown
    end

    protected

        #
        # one or two asserts...
        #
        def expect (code, res_body, res)

            assert_equal code, res.code.to_i

            val = res.body

            val = if res_body.is_a?(String)
                val.strip
            elsif res_body
                eval(val)
            end

            assert_equal(res_body, val) if res_body

            res
        end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rufus-verbs-0.8 test/testbase.rb
rufus-verbs-0.1 test/testbase.rb
rufus-verbs-0.5 test/testbase.rb
rufus-verbs-0.9 test/testbase.rb
rufus-verbs-0.10 test/testbase.rb
rufus-verbs-0.6 test/testbase.rb
rufus-verbs-0.2 test/testbase.rb
rufus-verbs-0.4 test/testbase.rb
rufus-verbs-0.7 test/testbase.rb
rufus-verbs-0.3 test/testbase.rb