This file contains hidden or 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
/Users/light/.rvm/gems/ruby-1.8.7-p302@cotweet-yellowdart/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require': no such file to load -- rails (MissingSourceFile) | |
from /Users/light/.rvm/gems/ruby-1.8.7-p302@cotweet-yellowdart/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' | |
from /Users/light/.rvm/gems/ruby-1.8.7-p302@cotweet-yellowdart/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in' | |
from /Users/light/.rvm/gems/ruby-1.8.7-p302@cotweet-yellowdart/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' | |
from /Users/light/.rvm/gems/ruby-1.8.7-p302@cotweet-yellowdart/gems/evergreen-0.3.0/lib/evergreen/rails.rb:2 | |
from /Users/light/work/tdd/cotweet/.bundle/environment.rb:308:in `require' | |
from /Users/light/work/tdd/cotweet/.bundle/environment.rb:308:in `require' | |
from /Users/light/work/tdd/cotweet/.bundle/environment.rb:306:in `each' | |
from /Users/light/work/tdd/cotweet/.bundle/environment.rb:306:in `requ |
This file contains hidden or 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
Error: TypeError: Cannot call method '<insert some method name -- yes, I put this here not Jasmine>' of undefined | |
at new <anonymous> (http://localhost:9887/jasmine/jasmine.js:89:50) | |
at [object Object].fail (http://localhost:9887/jasmine/jasmine.js:1900:27) | |
at [object Object].execute (http://localhost:9887/jasmine/jasmine.js:962:15) | |
at [object Object].next_ (http://localhost:9887/jasmine/jasmine.js:1708:31) | |
at [object Object].start (http://localhost:9887/jasmine/jasmine.js:1665:8) | |
at [object Object].execute (http://localhost:9887/jasmine/jasmine.js:1955:14) | |
at [object Object].next_ (http://localhost:9887/jasmine/jasmine.js:1708:31) | |
at [object Object].start (http://localhost:9887/jasmine/jasmine.js:1665:8) | |
at [object Object].execute (http://localhost:9887/jasmine/jasmine.js:2100:14) |
This file contains hidden or 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
def fork_tourist | |
fork do | |
# we're in the child | |
# run your tour | |
end | |
end | |
number_of_tours = 20 |
This file contains hidden or 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
should "what happens to those intersecting gliders!?" do | |
board = Board.new([ | |
[0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], | |
[1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1], | |
[0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0], | |
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], | |
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
This file contains hidden or 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Jasmine Test Runner</title> | |
<link rel="stylesheet" type="text/css" href="jasmine/lib/jasmine.css"> | |
<script type="text/javascript" src="jasmine/lib/jasmine.js"></script> | |
<script type="text/javascript" src="jasmine/lib/jasmine-html.js"></script> | |
</head> | |
<body> |
This file contains hidden or 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Jasmine Test Runner</title> | |
<link rel="stylesheet" type="text/css" href="jasmine/lib/jasmine.css"> | |
<script type="text/javascript" src="jquery-1.4.2.js"></script> | |
<script type="text/javascript" src="coffee-script.js"></script> | |
<script type="text/javascript" src="jasmine/lib/jasmine.js"></script> | |
<script type="text/javascript" src="jasmine/lib/jasmine-html.js"></script> |
This file contains hidden or 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
require 'nokogiri | |
require 'open-uri' | |
io = open 'http://slashdot.org' | |
text = io.read | |
doc = Nokogiri::HTML::Document.parse(text) | |
# Just in case you didn't know, "#<some id here>" is a CSS selector for locating an HTML element by ID | |
doc.css("#top_parent a").count | |
# voila! |
This file contains hidden or 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
class User < ActiveRecord::Base | |
before_save do | |
self.email.downcase! if self.email | |
end | |
def self.send_reset_password_instructions(attributes={}) | |
attributes[:email].downcase! | |
super(attributes) | |
end | |
end |
This file contains hidden or 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
require 'rubygems' | |
require 'coulda' | |
require 'raise_from_module' | |
Feature "Experimenting with Coulda" do | |
extend RaiseFromModule | |
def self.given_i_raise | |
Given "I raise an Exception" do | |
raise Exception, "testing from Coulda" |
This file contains hidden or 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
class SeleniumTest < ActionController::IntegrationTest | |
self.use_transactional_fixtures = false | |
def setup | |
DatabaseCleaner.clean | |
Capybara.current_driver = :selenium | |
super | |
end | |
def teardown |