spec/reuser/class_spec.rb in reuser-3.0.0 vs spec/reuser/class_spec.rb in reuser-3.1.0
- old
+ new
@@ -30,14 +30,10 @@
it "takes a symbol" do
lambda { subject.role(:admin) }.should_not raise_error
end
- it "takes a symbol, and an optional array" do
- lambda { subject.role(:admin, [:read, :write]) }.should_not raise_error
- end
-
it "returns a ReUser::Role instance" do
subject.role(:admin).should be_instance_of ReUser::Role
end
context "passing in a role that is already defined" do
@@ -52,10 +48,10 @@
subject.class_eval do
roles do
role(:admin)
end
end
- lambda { subject.role(:user) }.should raise_error
+ lambda { subject.role(:user) }.should raise_error(ReUser::RoleNotDefined)
end
end
end
end