Sha256: d4f35c96a3486bea217d6bd64f1b4cc056014aaf5653aecb63efdf6ba2d52bc5

Contents?: true

Size: 690 Bytes

Versions: 34

Compression:

Stored size: 690 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")

describe Webrat::Link do
#  include Webrat::Link

  before do
    webrat_session = mock(Webrat::TestAdapter)
    @link_text_with_nbsp = 'Link' + [0xA0].pack("U") + 'Text'
  end

  it "should pass through relative urls" do
    link = Webrat::Link.new(webrat_session, {"href" => "/path"})
    webrat_session.should_receive(:request_page).with("/path", :get, {})
    link.click
  end

  it "shouldnt put base url onto " do
    url = "https://www.example.com/path"
    webrat_session.should_receive(:request_page).with(url, :get, {})
    link = Webrat::Link.new(webrat_session, {"href" => url})
    link.click
  end

end

Version data entries

34 entries across 34 versions & 17 rubygems

Version Path
diabolo-webrat-0.5.1 spec/private/core/link_spec.rb
dstrelau-webrat-0.5.1 spec/private/core/link_spec.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/webrat-0.7.3/spec/private/core/link_spec.rb
indirect-webrat-0.7.5 spec/private/core/link_spec.rb
indirect-webrat-0.7.4 spec/private/core/link_spec.rb
webrat-0.7.3 spec/private/core/link_spec.rb
jbd-webrat-0.7.2.rails3 spec/private/core/link_spec.rb
webrat-0.7.2 spec/private/core/link_spec.rb
webrat-0.7.2.beta.2 spec/private/core/link_spec.rb
mutle-webrat-0.7.2.beta.1 spec/private/core/link_spec.rb
thoughtbot-webrat-0.7.2.pre spec/private/core/link_spec.rb
webrat-0.7.2.beta.1 spec/private/core/link_spec.rb
honkster-webrat-0.7.1.2 spec/private/core/link_spec.rb
honkster-webrat-0.7.1.1 spec/private/core/link_spec.rb
revo-webrat-0.7.0.1 spec/private/core/link_spec.rb
webrat-0.7.1 spec/private/core/link_spec.rb
davidtrogers-webrat-0.7.0 spec/private/core/link_spec.rb
revo-webrat-0.7.0 spec/private/core/link_spec.rb
revo-webrat-0.7.1.pre spec/private/core/link_spec.rb
webrat-0.7.0 spec/private/core/link_spec.rb