Skip to content

Instantly share code, notes, and snippets.

View thechrisoshow's full-sized avatar

Chris O'Sullivan thechrisoshow

View GitHub Profile
def deadline?
deadline?
end
When /^I reload the page$/ do
page.evaluate_script("window.location.reload()");
end
Coming to you LIVE from Gist!
require 'rubygems'
require 'sinatra'
set :public, "/Users/chris/work/cadburysvs/v2"
set :bundle_path, "/Users/chris/work/cadburysvs/v2/howtoplay/bundle/"
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb
# and made a lot more robust by me
# this implementation uses erb by default. if you want to use any other template mechanism
# then replace `erb` on line 13 and line 17 with `haml` or whatever
#!/usr/bin/env ruby
require 'webrick'
include WEBrick
require 'erb'
s = HTTPServer.new( :Port => 3000,:DocumentRoot => Dir::pwd + '/' + (ARGV[0] || '.'))
class ErbServlet < HTTPServlet::AbstractServlet
def do_GET(req, response)
File.open(ARGV[0],'r') do |f|
Business value and MMF
======================
You should discuss the “In order to” part of the feature and pop the why
stack max 5 times (ask why recursively) until you end up with one of the
following business values:
* Protect revenue
* Increase revenue
* Manage cost

IM AND CHRIS'S AMAZING LRUG TALK.

                        -OR-

THE RIVER WILD: NAVIGATING YOURSELF PAST THE WATERFALL

Idea that legacy code isn't just 'old' or written by someone else. you can be writing legacy code now!

@javascript
Scenario: Create a basic job # features/admin_users/create_jobs.feature:7
Given the date is "22 July 2010" # features/step_definitions/time_steps.rb:1
And an account "HPK account" exists # features/step_definitions/pickle_steps.rb:4
And a company "HPK" exists with account: account "HPK account", name: "Harmonypark" # features/step_definitions/pickle_steps.rb:4
And a client_company "BBH" exists with name: "BBH", account: account "HPK account", company: company "HPK" # features/step_definitions/pickle_steps.rb:4
And the client_company "BBH" is one of company "HPK"'s client_companies
@thechrisoshow
thechrisoshow / no_shoulds_punk_formatter.rb
Created February 24, 2010 13:39
RSpec formatter to detect 'shoulds' in your spec definition
require 'spec/runner/formatter/progress_bar_formatter'
# Put this in spec/support and run with:
# spec spec --require spec/support/no_shoulds_punk_formatter.rb --format NoShouldsPunkFormatter
class NoShouldsPunkFormatter < Spec::Runner::Formatter::ProgressBarFormatter
def initialize(options, output)
super
@examples_with_should = []