spec/spec_helper.rb in heimdallr-1.0.0.RC2 vs spec/spec_helper.rb in heimdallr-1.0.0

- old
+ new

@@ -1,5 +1,22 @@ require "heimdallr" +require "active_record" +require "sqlite3" +require "logger" +require "uri" -RSpec.configure do |config| - # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration +ROOT = File.join(File.dirname(__FILE__), '..') + +ActiveRecord::Base.logger = Logger.new('tmp/debug.log') +ActiveRecord::Base.configurations = YAML::load(IO.read('tmp/database.yml')) +ActiveRecord::Base.establish_connection('test') + +ActiveRecord::Base.connection.create_table(:users) do |t| + t.boolean :admin end + +ActiveRecord::Base.connection.create_table(:articles) do |t| + t.belongs_to :owner + t.text :content + t.integer :secrecy_level + t.timestamps +end \ No newline at end of file