spec/authority_spec.rb in authority-0.9.0 vs spec/authority_spec.rb in authority-1.0.0.pre2

- old
+ new

@@ -7,14 +7,16 @@ it "should have a default list of abilities" do Authority.abilities.should be_a(Hash) end it "should not allow modification of the Authority.abilities hash directly" do - expect { Authority.abilities[:exchange] = 'fungible' }.to raise_error(RuntimeError, "can't modify frozen Hash") + expect { Authority.abilities[:exchange] = 'fungible' }.to raise_error( + StandardError, /modify frozen/ + ) # can't modify frozen hash - exact error type and message depends on Ruby version end it "should have a convenience accessor for the ability verbs" do - Authority.verbs.sort.should eq([:create, :delete, :read, :update]) + Authority.verbs.map(&:to_s).sort.should eq(['create', 'delete', 'read', 'update']) end it "should have a convenience accessor for the ability adjectives" do Authority.adjectives.sort.should eq(%w[creatable deletable readable updatable]) end