spec/authority_spec.rb in authority-2.3.2 vs spec/authority_spec.rb in authority-2.4.0
- old
+ new
@@ -40,20 +40,20 @@
describe "enforcement" do
let(:user) { ExampleUser.new }
let(:resource_class) { ExampleResource }
- describe "if given options" do
+ describe "when given options" do
it "checks the user's authorization, passing along the options" do
options = { :for => 'context' }
user.should_receive(:can_delete?).with(resource_class, options).and_return(true)
Authority.enforce(:delete, resource_class, user, options)
end
end
- describe "if not given options" do
+ describe "when not given options" do
it "checks the user's authorization, passing no options" do
user.should_receive(:can_delete?).with(resource_class).and_return(true)
Authority.enforce(:delete, resource_class, user)
end