Skip to content

Instantly share code, notes, and snippets.

View carols10cents's full-sized avatar

Carol (Nichols || Goulding) carols10cents

View GitHub Profile
class TestTwo
def initialize
@hash = Hash.new
end
def self.attr_accessor(arg)
define_method("get_#{arg}") do
@hash[arg]
end
require 'test_two'
class Poop < TestTwo
attr_accessor :something
end
describe "test_two" do
before(:all) do
@poop = Poop.new
end
require "rubygems"
require "builder"
class Roster
def initialize
@members = []
@members_cache = []
@content = nil
end
require 'roster'
describe "roster" do
before(:each) do
@r = Roster.new
@r << "Gregory Brown"
end
it "should update cache the first time" do
before_obj_id = @r.object_id
# Pattern: Replace exception with test
class PreRefactoringRoster
def initialize
@members = []
end
attr_reader :members
def add_user(name)
> rake cucumber
bundle exec C:/Ruby/192-clean/bin/ruby.exe -I "C:/Ruby/192-clean/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib;lib" "C:/Ruby/192-clean/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/bin/cucumber" --profile default
*** WARNING: You must "gem install win32console" (1.2.0 or higher) to get coloured output on MRI/Windows
Using the default profile...
uninitialized constant Win32 (NameError)
C:/Ruby/192-clean/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.2.0/lib/rspec/expectations/backward_compatibility.rb:6:in `const_missing'
C:/Ruby/192-clean/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/formatter/unicode.rb:13:in `<top (required)>'
C:/Ruby/sample_term_app/features/support/env.rb:10:in `<top (required)>'
C:/Ruby/192-clean/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/rb_support/rb_language.rb:143:in `load'
C:/Ruby/192-clean/lib/ruby/gems/1.9.1/gems/cucumber-0.9.4/lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
C:\>git clone git://github.com/ashbb/rubyinstaller.git shoes_dev
Cloning into shoes_dev...
remote: Counting objects: 1205, done.
remote: Compressing objects: 100% (525/525), done.
remote: Total 1205 (delta 560), reused 1170 (delta 549)
Receiving objects: 100% (1205/1205), 281.40 KiB, done.
Resolving deltas: 100% (560/560), done.
C:\>dir shoes_dev
C:\shoes_dev>dir downloads
Volume in drive C has no label.
Volume Serial Number is 8415-8138
Directory of C:\shoes_dev\downloads
01/07/2011 10:10 AM <DIR> .
01/07/2011 10:10 AM <DIR> ..
08/16/2010 09:12 AM 514,023 7z915.zip
08/17/2010 08:58 AM 265,253 autoconf-2.65-1-msys-1.0.13-bin.tar.lzma
<span id="openid_comment">
<label>
<input type="checkbox" id="login_with_openid" name="login_with_openid" checked="checked" />
Authenticate this comment using <span class="openid_link">OpenID</span>. </label>
</span>
<script type="text/javascript">jQuery(function(){ add_openid_to_comment_form('http://carol-nichols.com/index.php', '30c38508d3') })</script>
module Foo
extend self
def a
"a"
end
def self.b
"b"
end