Sha256: 578d24418996ed83515b2a65bddb6f6edc597c623c42aa2cb07b96e4f9e7241f
Contents?: true
Size: 1.46 KB
Versions: 10
Compression:
Stored size: 1.46 KB
Contents
require 'spec_helper' require 'rails' describe Dumper do it 'conforms to public API' do Dumper::Agent.respond_to?(:start).should be_true end describe :Stack do it 'initializes stack' do stack = Dumper::Stack.new stack.framework.should == :rails stack.rails_env.should == 'development' end it 'detects mongoid 3' do require 'mongoid' Mongoid::Config.send :load_configuration, { sessions: { default: { hosts: ['localhost:27017'], database: 'test' } } } stack = Dumper::Stack.new stack.databases[:mongodb].should_not == nil end it 'detects mongo_mapper' do require 'mongo_mapper' MongoMapper.setup({ development: { database: 'test' } }, :development) MongoMapper.database stack = Dumper::Stack.new stack.databases[:mongodb].should_not == nil end it 'detects mysql' do require 'active_record' ActiveRecord::Base.configurations['development'] = { 'adapter' => 'mysql2' } stack = Dumper::Stack.new stack.databases[:mysql].should_not == nil end it 'detects postgresql' do require 'active_record' ActiveRecord::Base.configurations['development'] = { 'adapter' => 'postgresql' } stack = Dumper::Stack.new stack.databases[:postgresql].should_not == nil end it 'detects redis' do require 'redis' redis = Redis.new stack = Dumper::Stack.new stack.databases[:redis].should_not == nil end end end
Version data entries
10 entries across 10 versions & 1 rubygems