Skip to content

Instantly share code, notes, and snippets.

@stanislaw
stanislaw / ruby-1.9-tips.rb
Created November 25, 2011 19:13 — forked from igrigorik/ruby-1.9-tips.rb
Ruby 1.9 features, tips & tricks you may not know about...
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
@stanislaw
stanislaw / handystuff.md
Created September 19, 2011 21:19 — forked from gilgen/handystuff.md
Handy stuff
@stanislaw
stanislaw / warden.rb
Created May 16, 2011 05:45 — forked from cavalle/warden.rb
Testing Warden/Devise with Steak
# Create a file `spec/acceptance/support/warden.rb' with the following
# contents:
Spec::Runner.configure do |config|
config.include Warden::Test::Helpers, :type => :acceptance
config.after(:each, :type => :acceptance) { Warden.test_reset! }
end
# Or, if you're using RSpec 2 / Rails 3, the contents should be the following
# instead: