Sha256: 00602bee329bec7ab339a1fb991551d5690995f252aefc0119fde936321b654d
Contents?: true
Size: 890 Bytes
Versions: 3
Compression:
Stored size: 890 Bytes
Contents
$:.unshift(File.expand_path('../../lib', __FILE__)) require 'rubygems' require 'bundler' Bundler.require(:default, :development) require 'pathname' require 'logger' root_path = Pathname(__FILE__).dirname.join('..').expand_path lib_path = root_path.join('lib') log_path = root_path.join('log') log_path.mkpath require 'adapter/spec/an_adapter' require 'adapter/spec/types' require 'adapter-mongo' shared_examples_for "a mongo adapter" do it_should_behave_like 'an adapter' Adapter::Spec::Types.each do |type, (key, key2)| it "writes Object values to keys that are #{type}s like a Hash" do adapter[key] = {:foo => :bar} # mongo knows hashes and can serialize symbol values adapter[key].should == {'_id' => 'key', 'foo' => :bar} end end end logger = Logger.new(log_path.join('test.log')) LogBuddy.init(:logger => logger) Rspec.configure do |c| end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
adapter-mongo-0.5.4 | spec/helper.rb |
adapter-mongo-0.5.3 | spec/helper.rb |
adapter-mongo-0.5.2 | spec/helper.rb |