Sha256: a2081a477a58da668cf0ff3ac781e6bbbcf53a32490463b6ff51a4fec3040771

Contents?: true

Size: 685 Bytes

Versions: 1

Compression:

Stored size: 685 Bytes

Contents

require 'pry'
require 'token_attr'

# Require this file using `require 'spec_helper'` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
  config.before :each do
    Model.delete_all
  end
end

ActiveRecord::Base.establish_connection(adapter: 'sqlite3',
                                        database: ':memory:')

ActiveRecord::Schema.define do
  self.verbose = false

  create_table :models, force: true do |t|
    t.string :token
    t.string :private_token
    t.integer :scope_id
  end

end

class BaseModel < ActiveRecord::Base
  self.table_name = 'models'
  include TokenAttr::Concern
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
token_attr-0.2.0 spec/spec_helper.rb