Skip to content

Instantly share code, notes, and snippets.

View brynary's full-sized avatar

Bryan Helmkamp brynary

View GitHub Profile
tell me again why we need another one of these? was pastie not working well enough for you guys?
** okay, now i see... fork and versioned pasties. kinda neat. **
Fork you
namespace :selenium do
namespace :server do
desc "Install the selenium server"
task :install do
`wget http://archiva.openqa.org/repository/releases/org/openqa/selenium/selenium-remote-control/1.0-beta-1/selenium-remote-control-1.0-beta-1-dist.zip`
`mv selenium-remote-control-1.0-beta-1-dist.zip /usr/local`
Dir.chdir("/usr/local") do
`unzip /usr/local/selenium-remote-control-1.0-beta-1-dist.zip`
`rm /usr/local/selenium-remote-control-1.0-beta-1-dist.zip`
namespace :selenium do
namespace :app_server do
desc "Start a mongrel for the selenium environment on port 3001"
task :start do
rails_root = File.expand_path(File.dirname(__FILE__) + "/../..")
pid_file = File.expand_path(rails_root + "/tmp/pids/mongrel_selenium.pid")
system "cd #{rails_root}; mongrel_rails start -d -e selenium -p 3001 -c #{rails_root} --pid #{pid_file}"
end
it "should work with non-HTML documents" do
xml = '<foo bar="baz"></foo>'
xml.should have_xpath('/foo[bar="baz"]')
end
require 'cgi'
require 'html5/tokenizer'
module HTML5
# This module provides sanitization of XHTML+MathML+SVG
# and of inline style attributes.
#
# It can be either at the Tokenizer stage:
#
1) Failure:
test_should_allow_area_tag(SanitizeTest)
[./test/test_sanitizer.rb:12:in `check_sanitization'
./test/test_sanitizer.rb:48:in `test_should_allow_area_tag']:
<area title='1'>foo <bad>bar</bad> baz</area>.
<"<area title='1'/>foo &lt;bad&gt;bar&lt;/bad&gt; baz"> expected but was
<"<area title='1'/><p>foo &lt;bad&gt;bar&lt;/bad&gt; baz</p>">.
2) Failure:
test_should_allow_br_tag(SanitizeTest)
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require "nokogiri"
class HTMLTransformer
def initialize(xpath, &block)
@xpath = xpath
@block = block
end
[01:42:43 bhelmkamp@fozzie] ~/p/webrat (master)
$ gpr
error: object directory /data/git/repositories/5/d6/b2/ce/actraiser/webrat.git/objects does not exist; check .git/objects/info/alternates.
error: object directory /data/git/repositories/1/93/5a/e4/Adkron/webrat.git/objects does not exist; check .git/objects/info/alternates.
error: /data/git/repositories/0/04/10/f9/gwynm/webrat.git/objects: ignoring alternate object stores, nesting too deep.
error: /data/git/repositories/3/36/85/26/notch8/graveyard/61917.git/objects: ignoring alternate object stores, nesting too deep.
error: object directory /data/git/repositories/4/45/99/ed/chrisk/webrat.git/objects does not exist; check .git/objects/info/alternates.
error: object directory /data/git/repositories/5/d6/b2/ce/actraiser/webrat.git/objects does not exist; check .git/objects/info/alternates.
error: object directory /data/git/repositories/1/93/5a/e4/Adkron/webrat.git/objects does not exist; check .git/objects/info/alternates.
error: object directory /da
215) protected method `response' called for #<Webrat::RailsSession:0xe2af0a4>
(eval):2:in `response'
/Users/bhelmkamp/p/weplay/vendor/plugins/webrat/lib/webrat/rails.rb:76:in `response'
/Users/bhelmkamp/p/weplay/vendor/plugins/webrat/lib/webrat/rails.rb:34:in `response_body'
/Users/bhelmkamp/p/weplay/vendor/plugins/webrat/lib/webrat/core/session.rb:111:in `exception_caught?'
/Users/bhelmkamp/p/weplay/vendor/plugins/webrat/lib/webrat/core/session.rb:94:in `request_page'
/Users/bhelmkamp/p/weplay/vendor/plugins/webrat/lib/webrat/core/session.rb:152:in `visit'
(eval):2:in `visit'
./features/steps/event_steps.rb:611:in `When /^I visit My Calendar( again)?$/'
/Users/bhelmkamp/p/weplay/features/events/edit_recurring_events.feature:164:in `When I visit My Calendar'