Sha256: fc97d2aed650bd4fdb2ba3a7465f939d24d9d39cff1f42974e7b96f99a50d9dc
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
require 'test/unit' require 'marjoree' require 'marjoree/fixtures' require 'expected_result_set' Test::Unit::TestCase.fixture_path = File.join(File.dirname(__FILE__), '../fixtures') class TestMultipleDBFixtures < Test::Unit::TestCase include Marjoree # `odbcconf /A {configdsn "SYBASE ASE ODBC Driver" "DSN=first_db|NA=LGLAIB9Y2Y33J,5000|Uid=sa|Pwd=|Database=CRDMGR"}` # `odbcconf /A {configdsn "SYBASE ASE ODBC Driver" "DSN=second_db|NA=LGLAIB9Y2Y33J,5000|Uid=sa|Pwd=|Database=CRDMGR_TEST"}` def self.stub_fixtures(*tables) connect_me_to 'first_db' execute( "CREATE TABLE FIRST( id INT, name VARCHAR(255) )" ) if( !get_user_tables.include?( 'FIRST' ) ) connect_me_to 'second_db' execute( "CREATE TABLE SECOND( id INT )" ) if( !get_user_tables.include?( 'SECOND' ) ) connect_me_to 'first_db' fixtures(*tables) end stub_fixtures :FIRST, :SECOND def test_fixtures_inserted_into_correct_db connect_me_to 'first_db' assert_equal( 2, count( "FIRST" ) ) connect_me_to 'second_db' assert_equal( 3, count( "SECOND" ) ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
marjoree-0.0.9 | ./tests/marjoree/test_multiple_db_fixtures.rb |