Sha256: b6066ddcfd236919a8a35dfdf3ae5af110849489cc80b56b2a11860054fa38f3

Contents?: true

Size: 585 Bytes

Versions: 7

Compression:

Stored size: 585 Bytes

Contents

require 'spec_helper'

describe AdminIt::CollectionContext do
  let(:context_class) { described_class.create_class(:test, object_resource) }
  subject { context_class.new }

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

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

  it 'has entities setter' do
    arr = [object_class.new, object_class.new]
    subject.entities = arr
    expect(subject.entities).to be_kind_of Enumerator
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
admin_it-1.0.7 spec/lib/context/collection_context_spec.rb
admin_it-1.0.6 spec/lib/context/collection_context_spec.rb
admin_it-1.0.5 spec/lib/context/collection_context_spec.rb
admin_it-1.0.4 spec/lib/context/collection_context_spec.rb
admin_it-1.0.3 spec/lib/context/collection_context_spec.rb
admin_it-1.0.2 spec/lib/context/collection_context_spec.rb
admin_it-1.0.1 spec/lib/context/collection_context_spec.rb