Skip to content

Instantly share code, notes, and snippets.

View jm's full-sized avatar
💫
Livin' life. Or something.

Jeremy McAnally jm

💫
Livin' life. Or something.
View GitHub Profile
@jm
jm / gist:42156
Created December 31, 2008 23:53
# Put me in an initializer!
module ActionController
module Routing
class RouteSet
attr_accessor :routes
def initialize
@routes = []
@route_structure = {}
end
SQL (0.1ms) SET NAMES 'utf8'
SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
/!\ FAILSAFE /!\ Fri Jan 02 00:29:13 -0600 2009
Status: 500 Internal Server Error
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.request=
/Users/jeremymcanally/code/gwiki/vendor/rails/actionpack/lib/action_controller/base.rb:518:in `process_without_filters'
/Users/jeremymcanally/code/gwiki/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process'
/Users/jeremymcanally/code/gwiki/vendor/rails/actionpack/lib/action_controller/rescue.rb:65:in `call_with_exception'
/Users/jeremymcanally/code/gwiki/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:66:in `dispatch'
~/code/context(master) > sloccount lib/ test/
Creating filelist for lib
Creating filelist for test
Categorizing files.
Finding a working MD5 command....
Can't exec "md5sum": No such file or directory at /opt/local/bin/break_filelist line 688, <CODE_FILE> line 15.
Found a working MD5 command.
Computing results.
SLOC Directory SLOC-by-Language (Sorted)
6) Error:
test_should_show_page(PagesControllerTest::TestWithAnonymous19197610::TestViewing19197450):
ArgumentError: wrong number of arguments (0 for 1)
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/test_case.rb:134:in `initialize'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/test_case.rb:134:in `new'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/test_case.rb:134:in `setup_controller_request_and_response'
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:in `send'
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:in `evaluate_method'
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:166:in `call'
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:90:in `run'
model User
factory :valid, :name => "Jeremy", "login" => "jeremy", :admin => false
factory :admin, :admin => true
end
User.valid.create
User.valid.admin.create
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -Ilib:lib:test "/Library/Ruby/Gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb" "test/dsl_test.rb" "test/foundry_test.rb"
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:442:in `load_missing_constant': uninitialized constant ActiveSupport::MessageVerifier (NameError)
from /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:77:in `const_missing'
from /Users/jeremymcanally/code/plugin-dev/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:198:in `verifier_for'
from /Users/jeremymcanally/code/plugin-dev/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:82:in `initialize'
from /Users/jeremymcanally/code/plugin-dev/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:68:in `new'
from /Users/jeremymcanally/code/plugin-dev/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:68:in `build'
from /Users/j
// Rather than:
STAssertEquals(32, [centigradeFreezingPoint intValue],
@"Centigrade freezing point should be 32, but was %d instead!",
[centigradeFreezingPoint intValue]);
// It's now...
[[centigradeFreezingPoint intValue] shouldEqual:32];
[expect([myArray count]) shouldEqual:3]
[expect([obj isActive]) shouldBeTrue]
// Objects
[thing shouldEqual:thing];
// Primitive values
[expect(YES) shouldEqual:YES];
// Working on more matchers...
[expect([@"hello" isEqual:@"hello"]) shouldBeTrue];
// I think I might also add these methods so it reads better...
tags = ["one", "two", "three", "one", "two", "one"]
counts = Hash.new(0)
tags.each {|t| counts[t] += 1}
puts counts.inspect