Sha256: f04e433376eec6be11164a3e5f7b689aa9287e6076f0af663633beb297a96e4e
Contents?: true
Size: 1.41 KB
Versions: 6
Compression:
Stored size: 1.41 KB
Contents
require File.join(File.dirname(__FILE__), 'test_helper.rb') require 'rbkb/http' module HttpTestHelper # contains various test cases to test common interface features module CommonInterfaceTests def setup() raise "Helper stub called. Override setup() in TestCase" end def do_type_tests(x) raise "Helper stub called. Override do_type_tests() in TestCase" end def do_type_tests(x) raise "Helper stub called. Override do_capture_value_tests() in TestCase" end def test_init_parse req = @obj_klass.new(@rawdat, @obj_opts) do_capture_value_tests(req) do_type_tests(req) end def test_parse req = @obj_klass.parse(@rawdat, @obj_opts) do_capture_value_tests(req) do_type_tests(req) end def test_capture req = @obj.capture(@rawdat) do_capture_value_tests(req) do_type_tests(req) end def test_back_to_raw req = @obj.capture(@rawdat) assert_equal @rawdat_crlf, req.to_raw end def test_capture_and_reuse_nondestructive @obj.capture(@rawdat_crlf) @obj.reset_capture @obj.capture(@rawdat_crlf) do_capture_value_tests(@obj) do_type_tests(@obj) end def test_capture_and_reuse_destructive @obj.capture(@rawdat_crlf) @obj.reset_capture! @obj.capture(@rawdat_crlf) do_capture_value_tests(@obj) do_type_tests(@obj) end end end
Version data entries
6 entries across 6 versions & 2 rubygems