Sha256: a3aa857e1440258436994222fd2e119e4386a99491cf2317737fb562296b102a
Contents?: true
Size: 1.05 KB
Versions: 12
Compression:
Stored size: 1.05 KB
Contents
require 'configure_helper' require 'cream/configure/rails' class Role attr_accessor :name def initialize name self.name = name end def self.all [Role.new('admin'), Role.new('guest')] end end describe "Rails extension" do describe 'Extensions' do it "should extend Action View with Roles helper instance_methods and specific role methods" do after_init :view do :view.should be_extended_with Cream::View, :role, :host, :user_action_menu :view.should be_extended_with Cream::Helper, :role end init_app_railties :minimal, :view end it "should extend Action Controller" do after_init :controller do :controller.should be_extended_with Cream, :role :controller.should be_extended_with Cream::Controller, :ability :controller.should be_extended_with Cream::Helper, :role, :host end init_app_railties :minimal, :view end it "should work with safe_concat" do "abc".html_safe.should == "abc" end end end
Version data entries
12 entries across 12 versions & 1 rubygems