Sha256: c6e9d6df01d30ac466634daa379b1332a6e90738a6a1684b506f165aa7a83c0d
Contents?: true
Size: 1002 Bytes
Versions: 17
Compression:
Stored size: 1002 Bytes
Contents
module PageMagic describe SessionMethods do include_context :webapp_fixture let(:session) { PageMagic.session(application: rack_app, url: '/page1') } subject do OpenStruct.new(session: session).tap do |o| o.extend(described_class) end end describe '#execute_script' do it 'returns the output of Session#execute_script' do expect(session.raw_session).to receive(:execute_script).with(:script).and_return(:result) expect(subject.execute_script(:script)).to eq(:result) end end describe '#page' do it 'returns the current page of the session' do expect(subject.page).to eq(session.current_page) end end describe '#path' do it 'returns the path of the session' do expect(subject.path).to eq(session.current_path) end end describe '#url' do it 'returns the url of the session' do expect(subject.url).to eq(session.current_url) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems