Sha256: 5de239d9ba18b7f759f5ad684168cc2fa0093eb186af4d58168a01c858e69003

Contents?: true

Size: 1.14 KB

Versions: 10

Compression:

Stored size: 1.14 KB

Contents

Capybara::SpecHelper.spec '#html' do
  it "should return the unmodified page body" do
    @session.visit('/')
    @session.html.should include('Hello world!')
  end

  it "should return the current state of the page", :requires => [:js] do
    @session.visit('/with_js')
    @session.html.should include('I changed it')
    @session.html.should_not include('This is text')
  end
end

Capybara::SpecHelper.spec '#source' do
  it "should return the unmodified page source" do
    @session.visit('/')
    @session.source.should include('Hello world!')
  end

  it "should return the current state of the page", :requires => [:js] do
    @session.visit('/with_js')
    @session.source.should include('I changed it')
    @session.source.should_not include('This is text')
  end
end

Capybara::SpecHelper.spec '#body' do
  it "should return the unmodified page source" do
    @session.visit('/')
    @session.body.should include('Hello world!')
  end

  it "should return the current state of the page", :requires => [:js] do
    @session.visit('/with_js')
    @session.body.should include('I changed it')
    @session.body.should_not include('This is text')
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
capybara-2.2.1 lib/capybara/spec/session/html_spec.rb
capybara-2.2.0 lib/capybara/spec/session/html_spec.rb
capybara-2.2.0.rc1 lib/capybara/spec/session/html_spec.rb
swipe-rails-0.0.5 vendor/bundle/gems/capybara-2.1.0/lib/capybara/spec/session/html_spec.rb
capybara-2.1.0 lib/capybara/spec/session/html_spec.rb
capybara-2.1.0.rc1 lib/capybara/spec/session/html_spec.rb
capybara-2.0.3 lib/capybara/spec/session/html_spec.rb
capybara-2.1.0.beta1 lib/capybara/spec/session/html_spec.rb
capybara-2.0.2 lib/capybara/spec/session/html_spec.rb
capybara-2.0.1 lib/capybara/spec/session/html_spec.rb