Skip to content

Instantly share code, notes, and snippets.

View msassak's full-sized avatar

Mike Sassak msassak

View GitHub Profile
Given "foo bar" do
if @stub
puts "I am stubbed"
else
puts "I am not stubbed"
end
end
Before('@stub') do
@stub = true
Running cucumber --tags ~@wire
Pre INDENT change:
Failing Scenarios:
cucumber features/cucumber_cli.feature:428 # Scenario: Run a single background which matches a name using --name (Useful if there is an error in it)
cucumber features/default_snippets.feature:5 # Scenario: Cucumber doesn't know what language, and defaults to Ruby
cucumber features/exception_in_before_block.feature:21 # Scenario: Handle Exception in standard scenario step and carry on
cucumber features/exception_in_before_block.feature:47 # Scenario: Handle Exception in Before hook for Scenario with Background
cucumber features/html_formatter.feature:6 # Scenario: Everything in examples/self_test
require 'cucumber'
require 'cucumber/ast/table'
def dittoize(table)
rows = table.rows
rows.each_cons(2) do |upper, lower|
next unless lower.any? { |cell| cell == "''" }
lower.each_with_index do |cell, idx|
lower[idx] = upper[idx] if cell == "''"
msassak:~/Work/gherkin(master)$ gem list albacore
*** LOCAL GEMS ***
albacore (0.1.2)
msassak:~/Work/gherkin(master)$ irb
ruby-1.8.7-p174 > require 'albacore'
NameError: uninitialized constant RunCommand::AttrMethods
from /home/msassak/.rvm/gems/ruby/1.8.7/gems/albacore-0.1.2/lib/albacore/support/runcommand.rb:4
from /home/msassak/.rvm/ruby-1.8.7-p174/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
@msassak
msassak / after.rb
Created December 17, 2009 21:47 — forked from jnicklas/after.rb
require 'cucumber/rails/capybara'
Given a feature like so:
@wip
Feature: My Feature
@explode
Scenario: A scenario
Given foo
When bar
Then baz
@msassak
msassak / java1.rl
Created November 24, 2009 22:08 — forked from aslakhellesoy/java1.rl
/*
* @LANG: java
*/
class java1
{
%%{
machine java1;
alphtype byte;
module Cucumber
module SmartAst
class Execute < Command
def initialize(step_mother, broadcaster)
@step_mother, @broadcaster = step_mother, broadcaster
end
def execute(feature)
@broadcaster.broadcast_feature(feature)
feature.units.each do |unit|
.../features/support/fake_wire_server.rb:10:in `initialize': Address already in use - bind(2) (Errno::EADDRINUSE)
from ./features/support/fake_wire_server.rb:10:in `open'
from ./features/support/fake_wire_server.rb:10:in `run'
from ./features/step_definitions/wire_steps.rb:6:in `__instance_exec0'
from ./features/step_definitions/wire_steps.rb:4:in `fork'
from ./features/step_definitions/wire_steps.rb:4:in `__instance_exec0'
from ./features/support/env.rb:84:in `chdir'
from ./features/support/env.rb:84:in `in_current_dir'
from ./features/step_definitions/wire_steps.rb:3:in `__instance_exec0'
... 38 levels...
Parsing #1999: ../../gherkin/tasks/bench/generated/visionary_upward_trending_matrix.feature
==14016==
==14016== HEAP SUMMARY:
==14016== in use at exit: 7,892,592 bytes in 109,943 blocks
==14016== total heap usage: 2,212,742 allocs, 2,102,799 frees, 215,689,258 bytes allocated
==14016==
==14016== LEAK SUMMARY:
==14016== definitely lost: 61,516 bytes in 2,197 blocks
==14016== indirectly lost: 196 bytes in 7 blocks
==14016== possibly lost: 857,729 bytes in 28,997 blocks