Created
March 21, 2011 15:07
-
-
Save nelsnelson/879582 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'rubygems' | |
require 'sequel' | |
Sequel.extension :migration | |
class TestSomeDatabaseRoutines | |
def setup | |
TestDatabase.down | |
TestDatabase.up | |
TestSetup.down | |
TestSetup.up | |
# class Test < Sequel::Model; end # => class definition in method body (SyntaxError) | |
end | |
def test_create | |
a = Test.create(:name => 'Hello!') | |
assert(a != nil and a.name == 'Hello!') | |
end | |
end | |
# Migration stuff goes here | |
class Test < Sequel::Model # => ERROR: relation "test" does not exist | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment