Sha256: f8b8f95a7031b31211e232471269051671205a190b01d05a249ee3cf19d145b8

Contents?: true

Size: 1.86 KB

Versions: 5

Compression:

Stored size: 1.86 KB

Contents

require 'rubygems'

gem 'sqlite3-ruby'
gem :rspec, '>= 1.1.4'
gem :activerecord, '>= 2.1.0'

require File.join(File.dirname(__FILE__), '..', 'castronaut')
require File.join(File.dirname(__FILE__), 'spec_rails_mocks')

Castronaut.config = Castronaut::Configuration.load(File.join(File.dirname(__FILE__), '..', 'config', 'castronaut.example.yml'))

class CreateUsers < ActiveRecord::Migration
  old_connection = ActiveRecord::Base.connection
  ActiveRecord::Base.connection = Castronaut::Adapters::RestfulAuthentication::User.connection

  create_table "users", :force => true do |t|
    t.column :login,                     :string, :limit => 40
    t.column :name,                      :string, :limit => 100, :default => '', :null => true
    t.column :email,                     :string, :limit => 100
    t.column :crypted_password,          :string, :limit => 40
    t.column :salt,                      :string, :limit => 40
    t.column :created_at,                :datetime
    t.column :updated_at,                :datetime
    t.column :remember_token,            :string, :limit => 40
    t.column :remember_token_expires_at, :datetime
    t.string :first_name, :last_name
  end
  add_index :users, :login, :unique => true

  ActiveRecord::Base.connection = old_connection
end

class CreateUsers < ActiveRecord::Migration
  old_connection = ActiveRecord::Base.connection
  ActiveRecord::Base.connection = Castronaut::Adapters::Development::User.connection

  create_table "users", :force => true do |t|
    t.column :login,                     :string, :limit => 40
    t.column :name,                      :string, :limit => 100, :default => '', :null => true
    t.column :password,                  :string
  end
  add_index :users, :login, :unique => true

  ActiveRecord::Base.connection = old_connection
end

Spec::Runner.configure do |config|
  config.include Spec::Rails::Mocks
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
3mix-castronaut-0.5.0.2 spec/spec_helper.rb
masover-castronaut-0.5.0.1 spec/spec_helper.rb
relevance-castronaut-0.4.5 spec/spec_helper.rb
relevance-castronaut-0.4.6 spec/spec_helper.rb
relevance-castronaut-0.5.0 spec/spec_helper.rb