This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feature 'Stylesheets' do | |
scenario 'are all smaller than the Internet Explorer maximum' do | |
stylesheets = [] | |
#### This will examine the HTML at the given URL and check the stylesheets | |
#### linked therein. Add similar calls as needed to visit pages that expose | |
#### all of your site's CSS | |
stylesheets += stylesheets_at_url('/') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cart[items][][id]=5&cart[items][][id]=6&cart[items][][name]=i1&cart[items][][name]=i2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Capybara.register_driver :firefox_custom do |app| | |
require 'selenium/webdriver' | |
profile_path = "/path/to/prototype_profile" | |
profile = Selenium::WebDriver::Firefox::Profile.new(profile_path) | |
driver = Capybara::Driver::Selenium.new(app, :profile => profile) | |
driver | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir prototype_profile | |
$ cd prototype_profile | |
$ sqlite3 permissions.sqlite3 # This filename is important | |
sqlite> CREATE TABLE moz_hosts ( id INTEGER PRIMARY KEY,host TEXT,type TEXT,permission INTEGER, expireType INTEGER, expireTime INTEGER); | |
sqlite> INSERT INTO "moz_hosts" VALUES(1,'localhost','offline-app',1,NULL,NULL); | |
sqlite> .quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Complete thor tasks script for bash | |
# Save it somewhere and then add | |
# complete -C path/to/script -o default thor | |
# to your ~/.bashrc | |
# Mike Swieton ([email protected]), based almost entirely on: | |
# Xavier Shay (http://rhnh.net), combining work from | |
# Francis Hwang ( http://fhwang.net/ ) - http://fhwang.net/rb/rake-complete.rb | |
# Nicholas Seckar <[email protected]> - http://www.webtypes.com/2006/03/31/rake-completion-script-that-handles-namespaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'http-access2' # from gem httpclient | |
tests = { | |
# A simple test: GET a URL and expect a successful response | |
"Home page" => { | |
:get => "http://www.myapp.com/", | |
:result => 200 | |
}, |