Public Gists by lucashungaro

Gravatar
Thu Nov 12 18:55:13 -0800 2009
1
2
3
development: &global_settings
  database: textual_development
  host: 127.0.0.1
Gravatar
Sat Nov 07 19:28:36 -0800 2009
1
2
3
dns - http://freedns.ws
google apps - http://google.com/a
yola, pra criar o site - http://www.yola.com/
Gravatar
Tue Sep 22 23:15:53 -0700 2009
1
2
3
set :application, "myapp"
set :keep_releases, 5
 
Gravatar
Sat Aug 01 11:47:42 -0700 2009
1
2
3
# Twitter App Generator
# based on a template by Michael Bleigh
 
Gravatar
Fri May 29 10:05:24 -0700 2009
1
2
3
sudo scutil --set HostName <host_name>
 
Also, change the name in the "Sharing" preference pane
Gravatar
Tue May 12 17:23:34 -0700 2009
1
2
3
# default - allows the condition
Mocha::Configuration.allow(condition)
 
Gravatar
Tue May 12 17:18:34 -0700 2009
1
2
3
Mocha::Configuration.prevent(:stubbing_non_existent_method) #prevents stubbing of non-existent methods
 
Mocha::Configuration.prevent(:stubbing_method_unnecessarily) #prevents stubbing of unused methods
Gravatar
Tue May 12 17:17:39 -0700 2009
1
2
3
it "has been modified a lot of times" do
  Dependency.stubs(:a_method)
  NoLongerADependency.stubs(:something).returns(false)
Gravatar
Tue May 12 17:16:32 -0700 2009
1
2
3
it "should be successful" do
  Account.expects(:new).with(:current_user => @user, :first_name => "Test", :last_name => "Test").returns(@account)
  @account.expects(:login_method=).with(CONFIG::LOGIN::OpenID)
Gravatar
Tue May 12 09:56:33 -0700 2009
1
2
3
class MovieShelf
  def initialize
    @movies = []
Gravatar
Tue May 12 09:56:07 -0700 2009
1
2
3
context "a movie shelf" do
  setup { @shelf = MovieShelf.new }
 
Gravatar
Tue May 12 09:55:30 -0700 2009
1
2
3
class Movie
  attr_accessor :title
 
Gravatar
Tue May 12 09:55:00 -0700 2009
1
2
3
context "a movie shelf" do
  setup { @shelf = MovieShelf.new }
 
Gravatar
Tue May 12 09:19:05 -0700 2009
1
2
3
>> shelf = MovieShelf.new
=> #<MovieShelf:0x36eb88 @movies=[]>
>> m = Movie.new
Gravatar
Tue May 12 09:17:10 -0700 2009
1
2
3
class MovieShelf
  attr_accessor :movies
 
Gravatar
Tue May 12 09:14:54 -0700 2009
1
2
3
class Movie
  attr_accessor :title
end
Gravatar
Tue Mar 17 06:31:55 -0700 2009
1
2
3
# rails application template for generating customized rails apps
#
# == requires ==
gist: 52851 My default rails template
Gravatar
Mon Jan 26 07:59:32 -0800 2009
1
2
3
# Install gems
gem 'floehopper-mocha', :lib => 'mocha', :version => '~>0.9', :source => "http://gems.github.com"
gem 'thoughtbot-shoulda', :lib => 'shoulda', :version => '~>2.0', :source => 'http://gems.github.com'