spec/classes/map_spec.rb in fabric-0.2.0 vs spec/classes/map_spec.rb in fabric-0.3.0

- old
+ new

@@ -168,9 +168,15 @@ @map.grant 'test_user', :all @map.roles.each do |role| role.users.count.should == 1 end end + + it "should not add the user to the 'except' list when passed :all" do + @map.grant 'test_user', :all, :except => ['test'] + @map.roles.first(:name => 'test').users.count.should == 0 + @map.roles.first(:name => 'test again').users.count.should == 1 + end end it "should raise a Object Not Found if an invalid user identifier is passed" do lambda { @map.grant 'fake_user', 'test' }.should raise_error(DataMapper::ObjectNotFoundError) end \ No newline at end of file