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