Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

We couldn’t find that file to show.
$ cat init.rb | pygmentize -f html -l ruby
*** Error while highlighting:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 16: ordinal not in range(128)
(file "/Library/Python/2.5/site-packages/Pygments-0.9-py2.5.egg/pygments/lexer.py", line 151, in get_tokens)
$ pygmentize init.rb
<works>
try
{
beginAt(atUrl);
}
catch (RuntimeException re)
{
// If we get here, it's possible that we are running on java 1.5 +
// and the server is websphere. in this combination (and only this
// one AFAIK) the HttpUnit client receives a null from
// HttpUrlConnection.getErrorStream() which, according to the JDK javadoc
# watch me turn java into ruby
def try; end
def catch(*args) end
def RuntimeException(*args) end
def re; end
class Anything; def method_missing(*args) Anything.new end end
def getDialog; Anything.new end
def WebResponse(*args) end
def atUrl; '' end
11) Error:
test_spec {A User changing to a coupon plan} 004 [fails if the coupon is not in the db](A User changing to a coupon plan):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.squeeze
/Users/chris/Projects/github/app/models/public_key.rb:32:in `clear_newlines'
/Users/chris/Projects/github/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/callbacks.rb:34:in `send'
/Users/chris/Projects/github/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/callbacks.rb:34:in `evaluate_method'
/Users/chris/Projects/github/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/callbacks.rb:27:in `call'
/Users/chris/Projects/github/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/callbacks.rb:11:in `run'
/Users/chris/Projects/github/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/callbacks.rb:10:in `each'
BLOWIN UP YOUR SPOT
$ telnet localhost 1480
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
##
# test/spec/mini
# chris@ozmm.org
#
def context(*args, &block)
return super unless (name = args.first) && block
require 'test/unit'
klass = Class.new(Test::Unit::TestCase) do
def self.specify(name, &block) define_method("test_#{name.gsub(/\W/,'_')}", &block) end
def self.xspecify(*args) end
something
=begin
Copyright (c) 2008 Hans Engel
See the file LICENSE for licensing details.
=end
task :spec do
require 'rubygems'
Gem::manage_gems
require 'rake/gempackagetask'