spec/guard_spec.rb in ixtlan-guard-0.7.0 vs spec/guard_spec.rb in ixtlan-guard-0.7.2

- old
+ new

@@ -5,11 +5,11 @@ describe Ixtlan::Guard::GuardNG do subject do logger = Logger.new(STDOUT) def logger.debug(&block) - info("\n\t[debug] " + block.call) + #info("\n\t[debug] " + block.call) end Ixtlan::Guard::GuardNG.new(:guards_dir => File.join(File.dirname(__FILE__), "guards"), :logger => logger ) end it 'should fail with missing guard dir' do @@ -81,21 +81,6 @@ subject.allowed?(:users, :unknow, [:users]).should be_true subject.allowed?(:only_defaults, :unknow, [:users]).should be_true subject.allowed?(:allow_all_defaults, :update, [:users]).should be_true end - it 'should pass with right group and allowed flavor' do - subject.allowed?(:users, :update, [:users], :example){ |g| [:example]}.should be_true - end - - it 'should not pass with wrong group but allowed flavor' do - subject.allowed?(:users, :update, [:accounts], :example){ |g| [:example]}.should be_false - end - - it 'should not pass with wrong group but disallowed flavor' do - subject.allowed?(:users, :update, [:accounts], :example){ |g| []}.should be_false - end - - it 'should not pass with right group and disallowed flavor' do - subject.allowed?(:users, :update, [:users], :example){ |g| []}.should be_false - end end