Sha256: d453b851b1a6a31ebd9d653a9c45f728ca045ad952b41c5deabfaedf45d48b10

Contents?: true

Size: 1.44 KB

Versions: 52

Compression:

Stored size: 1.44 KB

Contents

#!/usr/bin/ruby
#
# Unit test for the BlueCloth class object 
# $Id: TEMPLATE.rb.tpl,v 1.2 2003/09/11 04:59:51 deveiant Exp $
#
# Copyright (c) 2004 The FaerieMUD Consortium.
# 

if !defined?( BlueCloth ) || !defined?( BlueCloth::TestCase )
	basedir = File::dirname( __FILE__ )
	require File::join( basedir, 'bctestcase' )
end


### This test case tests ...
class BlueClothClassTestCase < BlueCloth::TestCase

	TestString = "foo"

	def test_00_class_constant
		printTestHeader "BlueCloth: Class Constant"

		assert Object::constants.include?( "BlueCloth" ),
			"No BlueCloth constant in Object"
		assert_instance_of Class, BlueCloth
	end

	def test_01_instantiation
		printTestHeader "BlueCloth: Instantiation"
		rval = nil
		
		# With no argument... ("")
		assert_nothing_raised {
			rval = BlueCloth::new
		}
		assert_instance_of BlueCloth, rval
		assert_kind_of String, rval
		assert_equal "", rval

		# String argument
		assert_nothing_raised {
			rval = BlueCloth::new TestString
		}
		assert_instance_of BlueCloth, rval
		assert_kind_of String, rval
		assert_equal TestString, rval

		addSetupBlock {
			debugMsg "Creating a new BlueCloth"
			@obj = BlueCloth::new( TestString )
		}
		addTeardownBlock {
			@obj = nil
		}
	end

	def test_02_duplication
		printTestHeader "BlueCloth: Duplication"
		rval = nil
		
		assert_nothing_raised {
			rval = @obj.dup
		}
		assert_instance_of BlueCloth, rval
		assert_kind_of String, rval
		assert_equal TestString, rval
	end


end

Version data entries

52 entries across 52 versions & 5 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiantcms-couchrest_model-0.2.2 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiantcms-couchrest_model-0.2.1 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiantcms-couchrest_model-0.2 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiantcms-couchrest_model-0.1.9 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiantcms-couchrest_model-0.1.8 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiantcms-couchrest_model-0.1.7 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiantcms-couchrest_model-0.1.6 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiantcms-couchrest_model-0.1.5 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiant-0.7.2 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiant-0.8.2 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiant-rc-0.9.0 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
BlueCloth-1.0.1 tests/00_Class.tests.rb
radiant-0.8.1 vendor/extensions/markdown_filter/vendor/bluecloth/tests/00_Class.tests.rb
radiant-0.6.1 vendor/bluecloth/tests/00_Class.tests.rb
radiant-0.6.0 vendor/bluecloth/tests/00_Class.tests.rb
radiant-0.6.3 vendor/bluecloth/tests/00_Class.tests.rb
radiant-0.6.2 vendor/bluecloth/tests/00_Class.tests.rb
radiant-0.6.5.1 vendor/bluecloth/tests/00_Class.tests.rb
radiant-0.6.4 vendor/bluecloth/tests/00_Class.tests.rb