Sha256: 174242b0c348d90b9205fb88472decdc282a67b1f65f4b47071dd4f050688499

Contents?: true

Size: 845 Bytes

Versions: 1

Compression:

Stored size: 845 Bytes

Contents

RSpec.configure do |config|
  # Clear class state before each spec.
  config.before(:each) do
    Object.send(:remove_const, 'Post')
    Object.send(:remove_const, 'SubPost')
    load 'app/post.rb'
  end
end

# Test against real ActiveRecord models.
# Very much based on the test setup in
# https://github.com/iain/translatable_columns/

require "active_record"
require "activerecord-postgres-hstore"
require "activerecord-postgres-hstore/activerecord"
require "app/post.rb"

ActiveRecord::Base.establish_connection :adapter => "postgresql", :database => "test"

silence_stream(STDOUT) do
  ActiveRecord::Schema.define(:version => 0) do
    execute "CREATE EXTENSION IF NOT EXISTS hstore"

    create_table :posts, :force => true do |t|
      t.hstore :title_i18n
      t.hstore :body_i18n
    end
  end
end

I18n.load_path << "spec/app/de.yml"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
trasto-0.0.1 spec/spec_helper.rb