Sha256: 7adcbc338f4ce42a1c6145b8e014cf9e183cef8b1e75c23b579cbf173d661653
Contents?: true
Size: 559 Bytes
Versions: 7
Compression:
Stored size: 559 Bytes
Contents
require "#{File.dirname(__FILE__)}/../../spec_helper" shared_examples_for 'a containing model' do # clazz must be defined by the calling file let(:model) { clazz.new } it 'has children' do expect(model).to respond_to(:children) end it 'returns a collection of children' do expect(model.children).to be_an(Array) end it 'does not return objects for children that it does not have' do # Ensuring an empty, childless model model = clazz.new expect(model.children).to_not include(nil) end end
Version data entries
7 entries across 7 versions & 1 rubygems