Permalink
Browse files

Removed database entries after the test finnished.

  • Loading branch information...
1 parent d8d769f commit 4b90a8610e541c992c092370f3a2b8afb13d0ae9 @xertres xertres committed with Apr 25, 2011
Showing with 15 additions and 1 deletion.
  1. +15 −1 spec/assiociations_ldap_adapter_spec.rb
@@ -4,7 +4,6 @@
describe DataMapper::Adapters::LdapAdapter do
before do
-
DataMapper.repository(:ldap) do
User.all(:login.like => "b%").destroy!
Group.all(:name.like => "test_%").destroy!
@@ -16,6 +15,21 @@
@group2 = Group.create(:name => "test_admin_group")
end
end
+
+ after(:all) do
+ DataMapper.repository(:ldap) do
+ User.all(:login.like => "b%").destroy!
+ Group.all(:name.like => "test_%").destroy!
+ end
+ end
+
+ it 'should have valid testing data' do
+ @user1.should be_a_kind_of(User)
+ @user2.should be_a_kind_of(User)
+ @user3.should be_a_kind_of(User)
+ @group1.should be_a_kind_of(Group)
+ @group2.should be_a_kind_of(Group)
+ end
it 'should successfully save an object' do
DataMapper.repository(:ldap) do

0 comments on commit 4b90a86

Please sign in to comment.