Sha256: 153ac4889be7f5b5ffc473e7d207863336f5cfdaa70b0bfa10c92542352d24b7
Contents?: true
Size: 796 Bytes
Versions: 3
Compression:
Stored size: 796 Bytes
Contents
require 'spec_helper' describe "Simple Item1 rings" do class Item1 < ActiveRecord::Base include Concentric::Model ring 3, :write => [:name,:address] ring 3, :read => [:name,:address,:member_code] end it "can specify ring fields" do Item1.rings_abilities.should == { 3 => {:write=>[:address, :name], :read=>[:address, :member_code, :name]} } end end describe "Item2 rings with abilities" do class Item2 < ActiveRecord::Base include Concentric::Model ring 2, [:delete] => :this ring 3, :write => [:name,:address] ring 3, :read => [:name,:address,:member_code] end it "can specify ring fields" do Item2.rings_abilities.should == { 2 => {:delete=>true}, 3 => {:write=>[:address, :name], :read=>[:address, :member_code, :name]} } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kojac-0.17.0 | spec/demo/spec/models/model_ring_spec.rb |
kojac-0.16.0 | spec/demo/spec/models/model_ring_spec.rb |
kojac-0.15.0 | spec/demo/spec/models/model_ring_spec.rb |