Sha256: 77e10f1a6ced58926c161cebfadac01a0dee0f110dfa1099b4a0773fcc3d1d74

Contents?: true

Size: 567 Bytes

Versions: 5

Compression:

Stored size: 567 Bytes

Contents

shared_examples_for "Common Core API" do
  # Core API
  specify             { lambda { user.role_field }.should raise_error } # no, role_field is a class method    
  specify             { User.role_field.should_not be_nil } # yes, role_field is a class method    

  subject { user }
    its(:role_list)     { should include(:user) }
    its(:roles)         { should be_a Troles::Operations }

  specify             { user.static_roles?.should be_false }
  specify             { User.static_roles?.should be_false }  
  
  # TODO: Add examples with other users?
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
troles-0.6.1 spec/troles/common/api/core_api_spec.rb
troles-0.6.0 spec/troles/common/api/core_api_spec.rb
troles-0.5.2 spec/troles/common/api/core_api_spec.rb
troles-0.5.1 spec/troles/common/api/core_api_spec.rb
troles-0.5.0 spec/troles/common/api/core_api_spec.rb