Sha256: b86c55896194e8989fd734ffa3ac8a66617d3ac85b38d2571b1be46c0f3e960b
Contents?: true
Size: 707 Bytes
Versions: 4
Compression:
Stored size: 707 Bytes
Contents
require 'user_preferences' require 'active_record' require 'active_record/connection_adapters/sqlite3_adapter' RSpec.configure do |config| $stdout = StringIO.new # silence migrations ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') ActiveRecord::Migrator.migrate(File.expand_path('../migrations', __FILE__)) $stdout = STDOUT # prevent deprecation warnings I18n.enforce_available_locales = true config.before(:each) { stub_yml } end def stub_yml fixture = File.expand_path("../fixtures/user_preferences.yml", __FILE__) UserPreferences.stub(:yml_path).and_return(fixture) end class User < ActiveRecord::Base include UserPreferences::HasPreferences end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
user_preferences-1.0.0 | spec/spec_helper.rb |
user_preferences-0.0.3 | spec/spec_helper.rb |
user_preferences-0.0.2 | spec/spec_helper.rb |
user_preferences-0.0.1 | spec/spec_helper.rb |