Skip to content

Instantly share code, notes, and snippets.

View philcrissman's full-sized avatar

Phil Crissman philcrissman

View GitHub Profile
logged_in_user_context(:publisher) do
website_context :pas_domain do
context "GET to :index" do
setup { get :index }
should_respond_with :success # ? Not passing. Why?
should "render index page" do
assert_select 'h1', "Index"
end
end
class InterpokerImporter < Importer
LOGIN_URI = URI.parse("https://www1.ireferrer.com/C2/00/index.ehtml?Alias=rtback&Password=toesline&UserID=3042407&action=login")
ENTER_URI = URI.parse("https://www1.ireferrer.com/C2/00/enter.shtml")
AFFILIATE_URI = URI.parse("https://www1.ireferrer.com/C2/00/affiliate.shtml")
LOGIN2_URI = URI.parse("https://www1.ireferrer.com/C2/00/login2.shtml")
STATS_URI = URI.parse("https://www1.ireferrer.com/C2/00/comm_poker_detail.csv")
USER_AGENT = 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)'
def initialize
# ... other require statements
require 'authlogic/test_case'
class ActiveSupport::TestCase
# ... whatever is already in here
def login_as(user)
activate_authlogic
user_session = UserSession.new(:email => user.email, :password => 'asdfasdf')
user_session.save!
return false
<% @projects.each do |project| %>
<strong>Tasks assigned to this project:</strong><br />
<% project.tasks.each do |task| %>
<%= task.title %><br />
<% end %>
<% end %>
# this works fine, sends an xhr to the url that I want it to.
# but I want to send some params. Where to put them? :-\
=link_to "up", votes_path, :method => :post, :remote => true
ruby-1.8.7-p299 :027 > a = InternalAd.first
=> #<InternalAd id: 1, title: "An ad for a card", ad_file_name: "1920X1080.jpg", ad_content_type: "image/jpeg", link: "http://localhost:3000/idea_categories/congue-elemen...", ad_file_size: 976133, ad_updated_at: "2011-02-24 17:52:41", publish_at: "2011-02-22 06:00:00", hide_at: nil, created_at: "2011-02-24 17:52:42", updated_at: "2011-02-24 17:52:42">
ruby-1.8.7-p299 :028 > a.link
NoMethodError: Attempt to call private method
from /Users/philcrissman/.rvm/gems/ruby-1.8.7-p299@archivers_intranet/gems/activerecord-2.3.9/lib/active_record/attribute_methods.rb:236:in `method_missing'
from (irb):28
ruby-1.8.7-p299 :029 > a.private_methods.include?("link")
=> true
ruby-1.8.7-p299 :030 > a.methods.include?("link")
=> false
require 'rspec'
def something
"something"
end
def y_u_no?(expectation, &block)
block.call == expectation
end
Package pango was not found in the pkg-config search path.
Perhaps you should add the directory containing `pango.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pango' found
Package pango was not found in the pkg-config search path.
Perhaps you should add the directory containing `pango.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pango' found
brew list cairo 1,2>/dev/null
brew list pango 1,2>/dev/null
[lots of configure output]
==> Build Flags
CC: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/c++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2 -O3
CXXFLAGS: -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2 -O3
MAKEFLAGS: -j2
Error: Failed executing: make
==> Build Flags
CC: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/c++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/cc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2 -O3
CXXFLAGS: -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2 -O3
MACOSX_DEPLOYMENT_TARGET: 10.6
MAKEFLAGS: -j2
Error: Failed executing: make