spec/support/shared/element/capabilities/with_dom.rb in arachni-1.2.1 vs spec/support/shared/element/capabilities/with_dom.rb in arachni-1.3

- old
+ new

@@ -14,21 +14,21 @@ before do with_dom.skip_dom = true end it 'forces #dom to return nil' do - with_dom.dom.should be_nil + expect(with_dom.dom).to be_nil end end context false do before do with_dom.skip_dom = false end it 'forces #dom to return nil' do - with_dom.dom.should be_true + expect(with_dom.dom).to be_truthy end end end end @@ -38,51 +38,51 @@ before do with_dom.skip_dom = true end it 'returns true' do - with_dom.skip_dom?.should be_true + expect(with_dom.skip_dom?).to be_truthy end end context false do before do with_dom.skip_dom = false end it 'forces #dom to return nil' do - with_dom.skip_dom?.should be_false + expect(with_dom.skip_dom?).to be_falsey end end end end describe '#to_rpc_data' do let(:data) { with_dom.to_rpc_data } it "includes 'dom'" do - data['dom'].should == with_dom.dom.to_rpc_data + expect(data['dom']).to eq(with_dom.dom.to_rpc_data) end end describe '.from_rpc_data' do let(:restored) { with_dom.class.from_rpc_data data } let(:data) { Arachni::RPC::Serializer.rpc_data( with_dom ) } it "restores 'dom'" do - restored.dom.should == with_dom.dom + expect(restored.dom).to eq(with_dom.dom) end end describe '#dom' do it "returns #{described_class::DOM}" do - with_dom.dom.should be_kind_of described_class::DOM + expect(with_dom.dom).to be_kind_of described_class::DOM end end describe '#dup' do let(:dupped) { with_dom.dup } it 'preserves #dom' do - dupped.dom.should == with_dom.dom + expect(dupped.dom).to eq(with_dom.dom) end end end