public
Description: Webrat - Ruby Acceptance Testing for Web applications
Homepage: http://gitrdoc.com/brynary/webrat/tree/master/
Clone URL: git://github.com/brynary/webrat.git
webrat / spec / public / locators / field_with_id_spec.rb
100644 17 lines (13 sloc) 0.37 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
 
 
describe "field_with_id" do
  it "should work when there is a single quote in the ID" do
    with_html <<-HTML
<html>
<form>
<input type="text" id="user's name">
</form>
</html>
HTML
  
    field_with_id("user's name").id.should == "user's name"
  end
end