Skip to content

Instantly share code, notes, and snippets.

View richardlawrence's full-sized avatar

Richard Lawrence richardlawrence

View GitHub Profile
@richardlawrence
richardlawrence / gist:1317569
Created October 26, 2011 19:45
Error running Cucumber's specs under RubyMine
/Users/richard/.rvm/rubies/ruby-1.9.2-p136/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/richard/.rvm/gems/ruby-1.9.2-p136@cucumber/bin/rspec /Users/richard/Documents/Projects/hw/code/cucumber/spec/cucumber/ast/table_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter --example Table diff! should allow header mapping before diffing
Testing started at 1:44 PM ...
/Users/richard/Documents/Projects/hw/code/cucumber/cucumber.gemspec:55:in ``': No such file or directory - git ls-files (Errno::ENOENT)
from /Users/richard/Documents/Projects/hw/code/cucumber/cucumber.gemspec:55:in `block in <main>'
from /Users/richard/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1346:in `initialize'
from /Users/richard/Documents/Projects/hw/code/cucumber/cucumber.gemspec:5:in `new'
from /Users/richard/Documents/Projects/hw/code/cucumber/cucumber.gemspec:5:in `<main>'
from /Users/richard/.rvm/gems/rub
@richardlawrence
richardlawrence / gist:1299371
Created October 19, 2011 19:17
Convert a Capybara table to something you can diff with a Cucumber table
# change 'table' to a more specific selector when the page will have more than one table
find('table').all('tr').map { |row| row.all('th, td').map { |cell| cell.text.strip } }
@richardlawrence
richardlawrence / tiered_commissions.feature
Created August 10, 2011 20:01
Experiments with scenarios around tiered sales commissions
Feature: Tiered Sales Commissions
As a salesperson sells more, his commission percentage should get higher. Commissions are tiered.
Scenario: Flat commission
Given I earn a flat 10% commission
When I sell $10,000 of services
Then I should earn $1,000 in commissions
Scenario: Two tier commission (in second tier)
Given I earn 10% commission up to $5,000 of sales
Scenario: Link points to the right place # features/Imprints.feature:15
When I click on IBM Press # Unknown
Timed out calling server with message invoke (RuntimeError)
features/Imprints.feature:16:in `When I click on IBM Press'
undefined method `handle_success' for #<Cucumber::WireSupport::RequestHandler:0x3394638> (NoMethodError)
c:/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/wire_support/wire_packet.rb:26:in `send'
c:/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/wire_support/wire_packet.rb:26:in `handle_with'
c:/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/wire_support/connection.rb:20:in `call_remote'
c:/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/wire_support/request_handler.rb:11:in `execute'
c:/Ruby/lib/ruby/gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/wire_support/wire_protocol.rb:104:in `make_request'