Sha256: bac02e17689127e9f1aae834775bde961cbbea11e95b854caf4b139a1ca73ceb
Contents?: true
Size: 619 Bytes
Versions: 6
Compression:
Stored size: 619 Bytes
Contents
require 'bundler/setup' require 'pathname' root_path = Pathname(__FILE__).dirname.join('..').expand_path lib_path = root_path.join('lib') $:.unshift(lib_path) require 'toy' Adapter.define(:memory) do def read(key) deserialize(client[key_for(key)]) end def write(key, value) client[key_for(key)] = serialize(value) end def delete(key) client.delete(key_for(key)) end def clear client.clear end end class User include Toy::Store adapter :memory, {} end class LintTest < ActiveModel::TestCase include ActiveModel::Lint::Tests def setup @model = User.new end end
Version data entries
6 entries across 6 versions & 1 rubygems