Sha256: d6e75826e908ca8f7fe314e04c46c843ef3554fd148be53636f9c1103072839f
Contents?: true
Size: 876 Bytes
Versions: 7
Compression:
Stored size: 876 Bytes
Contents
require 'spec_helper' describe Arachni::Parser::WithChildren do subject { Arachni::Parser::Nodes::Element.new( :stuff ) } describe '#children' do context 'by default' do it 'is empty' do expect(subject.children).to be_empty end end end describe '#parent' do context 'by default' do let(:html) { '' } it 'is empty' do expect(subject.children).to be_empty end end end describe '#<<' do let(:other) { Arachni::Parser::Nodes::Element.new( :stuff ) } it 'adds a child' do subject << other expect(subject.children).to eq [other] end it 'sets the #parent on the child' do subject << other expect(other.parent).to eq subject end end end
Version data entries
7 entries across 7 versions & 1 rubygems