Skip to content

Commit

Permalink
Make bundle exec rake spec default to the in_memory adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
snusnu committed Apr 27, 2011
1 parent c9601fa commit 48419e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/dm-core/spec/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ def setup_logger
end

def require_spec_adapter
if ENV['ADAPTER'] == 'in_memory'
desired_adapter = ENV['ADAPTER']
if desired_adapter.nil? || desired_adapter == 'in_memory'
ENV['ADAPTER_SUPPORTS'] = 'all'
Adapters.use(Adapters::InMemoryAdapter)
else
require "dm-#{ENV['ADAPTER']}-adapter/spec/setup"
require "dm-#{desired_adapter}-adapter/spec/setup"
end
end

Expand Down

0 comments on commit 48419e1

Please sign in to comment.