require 'spec_helper' describe 'Element#after' do html <<-HTML
HTML it 'should insert the given html string after each element' do el = find '.after-spec-first' expect(el.size).to eq(2) el.after '

' expect(find('#foo').next.class_name).to eq('woosh') expect(find('#bar').next.class_name).to eq('woosh') end it 'should insert the given DOM element after this element' do find('#baz').after find('#some-header') expect(find('#baz').next.id).to eq('some-header') end end