Skip to content

Instantly share code, notes, and snippets.

View msassak's full-sized avatar

Mike Sassak msassak

View GitHub Profile
@msassak
msassak / steps.rb
Created March 2, 2011 20:09 — forked from DCarper/steps.rb
When /^I delete that comment$/ do
Comment.count.should == 1
@comment = Comment.last
debugger
When %Q{I press "X" within "#comments li:first .destroy_comment"}
end
Feature: test
Scenario: local bin # features/t.feature:2
Given I successfully run `todo oh hai` # aruba-0.3.5/lib/aruba/cucumber.rb:108
Then the output should contain exactly: # aruba-0.3.5/lib/aruba/cucumber.rb:153
"""
oh
hai
"""
describe "something" do
it "fails" do
raise "failure"
end
end
@msassak
msassak / cucumber.feature
Created June 13, 2011 20:16
cucumber.feature
Feature: testing cucumber
Background:
Given a scenario "Thingamabob" with:
"""
Given a thingamabob
When I frobnicate the thingamabob
Then it makes happy kittens
"""
Scenario:
@msassak
msassak / en.rb
Created September 22, 2011 17:05
# line 1 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en.rb.rl"
require 'gherkin/lexer/i18n_lexer'
module Gherkin
module RbLexer
class En #:nodoc:
# line 116 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en.rb.rl"
# This:
respond_to do |format|
format.html do
# generate html
end
format.js do
# generate javascript
end
end
export PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[36m\]\w\[\033[00m\]$(__git_ps1 "(%s)") \$ '
%% From "Why Functional Programming Matters" by John Hughes
-module(tree).
-include_lib("eunit/include/eunit.hrl").
-export([fold/4,
map/2]).
-type label() :: any().
-type tree() :: {label(), [tree()]}.
This is a test
acc_func(Xs) ->
acc_func(Xs, []).
acc_func([], Acc) ->
lists:reverse(Acc);
acc_func([X|Xs], Acc) ->
acc_func(Xs, [X * 2|Acc]).
(defn acc-func [xs]
(loop [my-xs (seq xs) acc []]