Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Remove dependent Resources first
Browse files Browse the repository at this point in the history
* Minor tweak to code that loads plugins when running specs
  • Loading branch information
dkubb committed Jun 13, 2009
1 parent 4a5d3c8 commit b0cc88d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion spec/public/model_spec.rb
Expand Up @@ -57,8 +57,12 @@ class Article

describe 'between different models' do
before :all do
@other.destroy
@article.destroy
@original.destroy

# make sure the default repository is empty
@article_model.all(:repository => @repository).destroy!
@article_model.all(:repository => @repository).should be_empty

# add an extra property to the alternate model
DataMapper.repository(@alternate_adapter.name) do
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Expand Up @@ -12,8 +12,8 @@

require 'dm-core'

ENV['PLUGINS'].to_s.split(' ').each do |plugin|
require plugin.strip
ENV['PLUGINS'].to_s.strip.split(/\s+/).each do |plugin|
require plugin
end

Pathname.glob((SPEC_ROOT + '{lib,*/shared}/**/*.rb').to_s).each { |file| require file }
Expand Down

0 comments on commit b0cc88d

Please sign in to comment.