Sha256: 3b1d7f33a12a53f869cbab4567a0db39cf6dffff8de532efb7925ecb06141422
Contents?: true
Size: 789 Bytes
Versions: 8
Compression:
Stored size: 789 Bytes
Contents
require 'spec_helper' RSpec.describe Yaks::NullResource do subject(:null_resource) { described_class.new } its(:attributes) { should eq Hash[] } its(:links) { should eq [] } its(:subresources) { should eq Hash[] } its(:collection?) { should be false } its(:null_resource?) { should be true } it { should respond_to :[] } its(:type) { should be_nil } describe '#each' do its(:each) { should be_a Enumerator } it 'should not yield anything' do null_resource.each { fail } end end it 'should contain nothing' do expect( null_resource[:key] ).to be_nil end context 'when a collection' do subject(:null_resource) { described_class.new( collection: true ) } its(:collection?) { should be true } end end
Version data entries
8 entries across 8 versions & 2 rubygems