This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ln -fs /opt/ruby-enterprise-1.8.6-20090610 /opt/ruby-enterprise | |
sudo ln -fs /opt/ruby-enterprise/bin/gem /usr/bin/gem | |
sudo ln -fs /opt/ruby-enterprise/bin/irb /usr/bin/irb | |
sudo ln -fs /opt/ruby-enterprise/bin/rake /usr/bin/rake | |
sudo ln -fs /opt/ruby-enterprise/bin/rails /usr/bin/rails | |
sudo ln -fs /opt/ruby-enterprise/bin/ruby /usr/bin/ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder