Sha256: 680c4c111ee40d9b3632f56d9421c088784383b5081330f77bb641edb4191bf3
Contents?: true
Size: 798 Bytes
Versions: 1
Compression:
Stored size: 798 Bytes
Contents
require 'spec_helper' ## Gives us ActiveRecord backed model Bar that we can test instances of ActiveRecord::Base.establish_connection( :adapter => "sqlite3", :database => ":memory:", :host => 'localhost') ActiveRecord::Migrator.migrate('../../db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil ) ## Gives us ActiveRecord backed model Bar that we can test instances of class Bar < ActiveRecord::Base end describe Keytar do describe 'requiring Keytar' do it 'should load keybuilder into ActiveRecord::Base' do describe Bar.ancestors do it {should include( KeyBuilder)} end end it 'should ' do name = "notblank" b = Bar.create(:name => name) b.name.should == name b.awesome_key.should == "bars:awesome:#{b.id}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
keytar-0.1.1 | spec/keytar/keytar_spec.rb |