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 File.dirname(__FILE__) + '/../foo_page' | |
describe FooPage do | |
before(:all) do | |
html = File.open(File.dirname(__FILE__) + '/../fixtures/foo.html').read | |
doc = Capybara.string(html) | |
@page = FooPage(doc) | |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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 bash | |
# This is an RVM Project .rvmrc file, used to automatically load the ruby | |
# development environment upon cd'ing into the directory | |
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional. | |
ruby_id='ruby-1.9.2-p290' | |
gemset_id='proj' | |
environment_id="${ruby_id}@${gemset_id}" |
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
source :rubygems | |
group :guard do | |
gem 'guard', '~>0.8.4' | |
gem 'guard-bundler' | |
gem 'guard-cucumber' | |
gem 'guard-livereload' | |
gem 'guard-rspec' | |
gem 'guard-process' | |
gem 'guard-shell' |
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
include Opscode::Aws::Ec2 | |
#Auto locates and attached ebs devices based on the data bag they reside in. The following test cases need to be performed | |
# Create multiple resources with new node: PASS | |
# | |
# Re-attach multiple resources after a reboot: PASS | |
# | |
# Create resources across 2 runs. First run creates first raid set, second run re-attaches then creates: PASS | |
# |
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/ruby -w | |
# See http://help.papertrailapp.com/kb/how-it-works/web-hooks | |
require 'yajl' | |
require 'faraday' | |
class PapertrailWebhookRequest | |
def self.connection | |
Faraday::Connection.new |
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
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs | |
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center | |
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json | |
findbugs looks like a short plugin name. Did you mean 'null'? | |
# Specifying a full URL works! | |
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi | |
# Get the update center ourself |
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
# Removing leftover leases and persistent rules | |
echo "cleaning up dhcp leases" | |
rm /var/lib/dhcp3/* | |
# Make sure Udev doesn't block our network | |
# http://6.ptmc.org/?p=164 | |
echo "cleaning up udev rules" | |
DIR_PATH=`readlink -f "/etc/udev/rules.d/70-persistent-net.rules"` # get rid of symlinks and get abs path | |
rm -rf /etc/udev/rules.d/70-persistent-net.rules | |
if [[ ! -d "${DIR_PATH}" ]] ; then # now you're testing |
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
source 'http://rubygems.org' | |
gem 'ruby-libvirt' | |
gem 'ruby-vnc' |