Skip to content

Instantly share code, notes, and snippets.

@rschooley
rschooley / gist:da384899e0241f3cf5f3
Created April 3, 2015 18:09
BDD / gherkin resources
http://www.amazon.com/Cucumber-Book-Behaviour-Driven-Development-Programmers/dp/1934356808/ref=sr_1_2?ie=UTF8&qid=1408119773&sr=8-2&keywords=cucumber
http://benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories.html
@rschooley
rschooley / database_cleaner.rb
Created September 3, 2014 15:49
support/database_cleaner.rb
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
alias pg_start="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start"
alias pg_stop="pg_ctl -D /usr/local/var/postgres stop -s -m fast"
//
// dependencies
//
var http = require('http');
//
// http error
// supports status code and message (optional)
@rschooley
rschooley / Makefile
Created December 27, 2013 17:58
Mafile for node dev, prod, and test (with mocha)
TEST = $(shell find test -name "*-tests.js")
dev:
node web.js
test:
NODE_ENV=test node_modules/mocha/bin/mocha $(TEST) --reporter dot
production:
NODE_ENV=production node web.js