My Recent Pastes (173 and counting)
Pastes by Defiler (173 and counting)
Below are the 8 most recent pasties by Defiler.
November 16, 2006
11:51PM EDT
by Defiler
View all 31 lines
module Spec module Expectations # This module adds syntactic sugar that allows usage of should_* instead of should.* module UnderscoreSugar def handle_underscores_for_rspec!
November 15, 2006
12:12PM EDT
by Defiler
View
Includes file attachment.
SELECT left_sides.`id` AS t0_r0, left_sides.`created_at` AS t0_r1, left_sides.`hit_count` AS t0_r2, right_sides.`id` AS t1_r0, right_sides.`name` AS t1_r1, right_sides.`type` AS t1_r2, right_sides.`facet_id` AS t1_r3 FROM left_sides LEFT OUTER JOIN right_sides_left_sides ON right_sides_left_sides.search_id = left_sides.id LEFT OUTER JOIN right_sides ON right_sides.id = right_sides_left_sides.facet_id WHERE (right_sides.id in (5)) GROUP BY left_sides.id HAVING count(right_sides.id) = 1
November 14, 2006
2:16PM EDT
by Defiler
View all
26 lines
Includes file attachment.
haystack = "yargle bargle margle hoooo missi" needle = "mississippi" suffixes = {} 0.upto(needle.length-2) do |i| needle.length.downto(1) do |j|
November 10, 2006
11:23AM EDT
by Defiler
View all
141 lines
Includes file attachment.
module Exception2MessageMapper @RCS_ID='-$Id: e2mmap.rb,v 1.10 1999/02/17 12:33:17 keiju Exp keiju $-' E2MM = Exception2MessageMapper
November 07, 2006
1:01PM EDT
by Defiler
View all
16 lines
Includes file attachment.
def create if params[:zip] =~ /\w/ @zip = nil Zip.transaction do begin
October 29, 2006
2:58PM EDT
by Defiler
View all
119 lines
Includes file attachment.
require File.dirname(__FILE__) + '/../spec_helper' def login_as(user) request.session[:user] = user ? users(user).id : nil end
October 29, 2006
2:47PM EDT
by Defiler
View all
6 lines
Includes file attachment.
specify "should login with cookie" do login_as :quentin request.cookies["auth_token"] = cookie_for(:quentin) get :index controller.should_satisfy {|c| c.send(:logged_in?)}
August 17, 2006
2:06PM EDT
by Defiler
with_dom do |page| link_to_remote :url => {:action => 'weeble', :id => @thing.id}, :with => {:param_name1 => page[:other_thing_id], :param_name2 => page[:yet_another_thing_id]} end
