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
escape "^Ll" | |
setenv LC_CTYPE en_US.UTF-8 | |
defutf8 on | |
autodetach on | |
crlf off | |
deflogin off | |
hardcopy_append on | |
startup_message off |
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
class Report | |
attr_accessor :preamble, :before, :after, :prologue | |
def initialize | |
@subject = 'Monthly Report' | |
@content = ['Things are going', 'Really, really good!'] | |
end | |
def generate | |
[:preamble,:head,:body,:prologue].map do |meth| | |
send(meth) | |
end.compact.join("\n") |
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 'webrat' | |
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} | |
Webrat.configure do |config| | |
config.mode = :rails | |
config.open_error_files = false # optional, but keeps me sane | |
end | |
Spec::Runner.configure do |config| |
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
module Spec::DSL::Main | |
alias :Feature :describe | |
def Story(description) | |
@description_args.push("\n#{description}\n") | |
end | |
end | |
module Spec::Example::ExampleGroupMethods | |
def executes(scope=:all, &blk) | |
before(scope, &blk) |
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
Röyksoppp, 11/19 - The Regency Ballroom (http://www.coasttocoasttickets.com/buy/san_francisco_ca.htm?pid=1176889) | |
Anti Pop Consortium, 11/20 - Mojito (http://www.sunsetpromotions.net/events/57845/Antipop-Consortium--Mojito) | |
DJ Nu Mark, 11/21 - The Mighty (http://www.sfstation.com/dj-nu-mark-e739571) | |
Cunning Lynguists and Pep Love, 11/21 - (http://www.ticketmaster.com/Cunninlynguists-Plus-Pep-Love-tickets/artist/1367539) | |
Dethklok and Mastodon, 11/21 - San Jose State University Event Center (http://www.livenation.com/edp/eventId/412063) |
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
# not so much like this: | |
class PeterParkerController < ApplicationController | |
def show | |
expose(:spider){ 'to radiation' } | |
end | |
end | |
# as like this: | |
class PeterParkerController < ApplicationController | |
expose(:spider){ 'to radiation' } |
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
# usage: | |
# field_labeled('Select your address').should have_option("Home Address") | |
Spec::Matchers.define :have_option do |expected| | |
def options_for(select_field) | |
select_field.options.map(&:inner_text) | |
end | |
match do |select_field| | |
raise "Field is not a SelectField" unless select_field.kind_of?(Webrat::SelectField) | |
options_for(select_field).include?(expected) |
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
def wait_conditionally_until | |
if page.driver.wait? | |
page.wait_until do | |
begin | |
yield | |
rescue Selenium::WebDriver::Error::WebDriverError => e | |
# do nothing - continue to wait for timeout | |
end | |
end | |
else |
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 'bundler', '~> 1.0.0' | |
gem 'decent_exposure', '~> 1.0.0.rc1' | |
gem 'devise', '~> 1.1.2' | |
gem 'haml' | |
gem 'hassle', :git => 'git://github.com/Papipo/hassle.git' | |
gem 'pg' | |
gem 'rails', '3.0.0' |
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.join(File.dirname(__FILE__),'dev_gemfile') | |
source 'http://rubygems.org' | |
gem 'bundler', '~> 1.0.0' | |
gem 'decent_exposure', '~> 1.0.0.rc1' | |
gem 'devise', '~> 1.1.2' | |
gem 'haml' | |
gem 'hassle', :git => 'git://github.com/Papipo/hassle.git' | |
gem 'pg' |
OlderNewer