Sha256: 01ea3abbc4859ad01b47390d656d88b91b81ebbcb8e7cb29e00ce1778bb6e16b
Contents?: true
Size: 915 Bytes
Versions: 2
Compression:
Stored size: 915 Bytes
Contents
require 'test/unit' class TestContainsMethodOnMarjoree < Test::Unit::TestCase include Marjoree def setup $db.do( "CREATE TABLE TEST_TABLE( id int NOT NULL, value int NOT NULL )" ) $db.do( "INSERT INTO TEST_TABLE ( id, value ) VALUES( 0, 10 )" ) $db.do( "INSERT INTO TEST_TABLE ( id, value ) VALUES( 1, 11 )" ) end def test_contains assert( contains?( "TEST_TABLE", :id => 0, :value => 10 ) ) assert( contains?( "TEST_TABLE", :id => 1, :value => 11 ) ) assert( contains?( "TEST_TABLE", :id => 1 ) ) assert( !contains?( "TEST_TABLE", :id => 2, :value => 12 ) ) end def test_contains?_with_bad_column_names assert( !contains?( "TEST_TABLE", :wibble => 'wobble' ) ) end def teardown $db.do( "TRUNCATE TABLE TEST_TABLE" ) $db.do( "DROP TABLE TEST_TABLE" ) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
marjoree-0.0.1 | ./tests/test_contains.rb |
marjoree-0.0.9 | ./tests/marjoree/test_contains.rb |