Skip to content

Instantly share code, notes, and snippets.

View msassak's full-sized avatar

Mike Sassak msassak

View GitHub Profile
Users want to know that nobody can masquerade as them. We want to extend trust
only to visitors who present the appropriate credentials. Everyone wants this
identity verification to be as secure and convenient as possible.
Feature: Logging in
As an anonymous user with an account
I want to log in to my account
So that I can be myself
#
{
name: "Valuable Feature",
description: "Blah blah blah",
scenario: {
name: "Doing something",
steps: ["Given one", "When two", "Then three"]
}
}
Rehearsal -----------------------------------------------
c_gherkin: 0.260000 0.030000 0.290000 ( 0.311629)
rb_gherkin: 16.880000 0.150000 17.030000 ( 17.040578)
cucumber: 97.900000 0.390000 98.290000 ( 99.274202)
tt: 98.710000 0.400000 99.110000 ( 99.863826)
------------------------------------ total: 214.720000sec
user system total real
c_gherkin: 0.310000 0.010000 0.320000 ( 0.332545)
rb_gherkin: 17.360000 0.230000 17.590000 ( 17.842631)
class Plugins < Cucumber::Plugins
register MyWaveInput, :as => :input
register MyAwesomeFormatter, :as => :formatter
register MSWordParser, :as => :parser
end
require 'gherkin'
class TableListener
attr_reader :rows
def table(rows, line_number)
@rows = rows
end
end
class Parser
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
.../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...
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|
@msassak
msassak / java1.rl
Created November 24, 2009 22:08 — forked from aslakhellesoy/java1.rl
/*
* @LANG: java
*/
class java1
{
%%{
machine java1;
alphtype byte;
Given a feature like so:
@wip
Feature: My Feature
@explode
Scenario: A scenario
Given foo
When bar
Then baz