Skip to content

Instantly share code, notes, and snippets.

# Factory girl, relaxed.
#
# Factory.define :user do |f|
# f.login 'johndoe%d' # Sequence.
# f.email '%{login}@example.com' # Interpolate.
# f.password f.password_confirmation('foobar') # Chain.
# end
#
# Factory.define :post do |f|
# f.user { Factory :user } # Blocks, if you must.
script/plugin install git://github.com/purzelrakete/workling.git
gem sources -a http://gems.github.com/
sudo gem install starling-starling
sudo mkdir /var/spool/starling
sudo ln -s /opt/ruby-enterprise/bin/starling /usr/bin/starling
sudo starling -d -p 22122
starling -v
#! /bin/sh
### BEGIN INIT INFO
# Provides: mongodb
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the mongodb data-store
# Description: starts mongodb using start-stop-daemon
#Core Libs
sudo apt-get install curl tcsh git-core scons g++
sudo apt-get install libpcre++-dev libboost-dev libmozjs-dev
#Spiderpig (Oh wait, Spidermonkey)
curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
tar zxvf js-1.7.0.tar.gz
cd js/src
export CFLAGS="-DJS_C_STRINGS_ARE_UTF8"
make -f Makefile.ref
describe UsersController do
describe "handling GET /users.xml" do
before(:each) do
@users = mock("Array of Users", :to_xml => "XML")
User.stub!(:find).and_return(@users)
end
def do_get
@request.env["HTTP_ACCEPT"] = "application/xml"
get :index