Sha256: 95e42088778f07084f342d2e84f497bd0866d739429a5c64273d84579ba14823

Contents?: true

Size: 778 Bytes

Versions: 23

Compression:

Stored size: 778 Bytes

Contents

require 'spec_helper'

describe AdminIt::ObjectData::Context do
  before do
    object_class.class_eval do
      def r; 'r_value'; end
      def rw; @rw_value ||= 'rw_value'; end
      def rw=(value); @rw_value = value; end
      def w=(value); @w_value = value; end
      def bool?; true; end
      def wrong_getter_arity(test); true; end
      def wrong_setter1_arity=(test, me); true; end
      def wrong_setter2_arity=; true; end
    end
  end

  xit 'retrieves all fields for ancestors' do
    fields = object_context.fields(scope: :all)
    expect(fields.size).to eq 3
  end

  xit 'reads fields' do
    single_object_context.entity = object
    expect(single_object_context.values).to eq r: 'r_value', rw: 'rw_value'
  end
end

describe AdminIt::ObjectData::Field do
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
admin_it-1.3.8 spec/lib/data/object_spec.rb
admin_it-1.3.7 spec/lib/data/object_spec.rb
admin_it-1.3.6 spec/lib/data/object_spec.rb
admin_it-1.3.5 spec/lib/data/object_spec.rb
admin_it-1.3.4 spec/lib/data/object_spec.rb
admin_it-1.3.3 spec/lib/data/object_spec.rb
admin_it-1.3.2 spec/lib/data/object_spec.rb
admin_it-1.3.1 spec/lib/data/object_spec.rb
admin_it-1.3.0 spec/lib/data/object_spec.rb
admin_it-1.2.8 spec/lib/data/object_spec.rb
admin_it-1.2.7 spec/lib/data/object_spec.rb
admin_it-1.2.6 spec/lib/data/object_spec.rb
admin_it-1.2.5 spec/lib/data/object_spec.rb
admin_it-1.2.4 spec/lib/data/object_spec.rb
admin_it-1.2.3 spec/lib/data/object_spec.rb
admin_it-1.2.2 spec/lib/data/object_spec.rb
admin_it-1.2.1 spec/lib/data/object_spec.rb
admin_it-1.2.0 spec/lib/data/object_spec.rb
admin_it-1.1.0 spec/lib/data/object_spec.rb
admin_it-1.0.11 spec/lib/data/object_spec.rb