require 'spec_helper' describe "Role" do with_models it "normalization" do Role.normalize_roles(%w{manager member specific_role user:user1}).should == %w{member specific_role user:user1} end it "denormalization to higher roles" do Role.denormalize_to_higher_roles(%w{member specific_role user:user1}).should == %w{manager member specific_role user:user1} end it "denormalization to lower roles" do Role.denormalize_to_lower_roles(%w{member specific_role user:user1}).should == %w{member specific_role user user:user1} end end