Sha256: 97099b39cd8ae09a89cc6ff2c5a1a579421b93fc1ff26a174c701b9e78a027f3

Contents?: true

Size: 788 Bytes

Versions: 23

Compression:

Stored size: 788 Bytes

Contents

require 'spec_helper'

describe AdminIt::Context do
  let(:context_class) { described_class.create(:test, object_resource) }
=begin
  subject { context_class.new }

  # DSL methods
  it { expect(context_class.collection?).to be_false }
  it { expect(context_class.single?).to be_false }

  # instance methods
  it { expect(subject.collection?).to be_false }
  it { expect(subject.single?).to be_false }

  it 'sets entity class to Resource entity class' do
    expect(subject.entity_class).to eq object_resource.entity_class
  end

  it 'sets fields to empty array by default' do
    expect(subject.class.fields).to eq []
  end

  it 'extends AdminIt::Object context by default' do
    expect(subject.class.included_modules)
      .to include AdminIt::ObjectData::Context
  end
=end
end

Version data entries

23 entries across 23 versions & 1 rubygems

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