Skip to content

Instantly share code, notes, and snippets.

@HusseinMorsy
Created April 8, 2009 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HusseinMorsy/91798 to your computer and use it in GitHub Desktop.
Save HusseinMorsy/91798 to your computer and use it in GitHub Desktop.
require "rubygems"
require "webrat"
require 'spec'
include Webrat::Matchers
output = "
<h1>Hallo Welt<h1>
<p>lorem</p>
<a name='demo' />
"
puts "test a"
output.should have_selector("a", :name => "demo")
# => no output, no error
puts "test h1"
output.should have_selector("h1", :class => "main")
# =>expectation error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment