File: execute_script_spec.rb

package info (click to toggle)
ruby-capybara 2.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 948 kB
  • ctags: 516
  • sloc: ruby: 7,998; makefile: 4
file content (7 lines) | stat: -rw-r--r-- 313 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
Capybara::SpecHelper.spec "#execute_script", :requires => [:js] do
  it "should execute the given script and return nothing" do
    @session.visit('/with_js')
    @session.execute_script("$('#change').text('Funky Doodle')").should be_nil
    @session.should have_css('#change', :text => 'Funky Doodle')
  end
end