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 MyCollection | |
| def initialize | |
| @data = [] | |
| @data.extend(MySpecialFeatures) | |
| end | |
| def some_method | |
| @data.use_one_of_my_features | |
| 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
| #include<stdio.h> | |
| #if !defined(__LP64__) | |
| #define IS_64 0 | |
| #else | |
| #define IS_64 1 | |
| #endif | |
| main() | |
| { |
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 "minitest/autorun" | |
| require "set" | |
| FIXTURE_DIR = File.expand_path( | |
| File.dirname(__FILE__)+"/fixtures/") | |
| # adopted from: https://gist.github.com/839034 | |
| def context(*args, &block) | |
| return super unless (name = args.first) && block |
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
| seacreature:spork-testing$ spork | |
| NOTE: Gem.latest_load_paths is deprecated with no replacement. It will be removed on or after 2011-10-01. | |
| Gem.latest_load_paths called from /Users/seacreature/.rvm/gems/ruby-1.9.2-p180/gems/spork-0.8.5/lib/spork.rb:112. | |
| NOTE: Gem.all_partials is deprecated with no replacement. It will be removed on or after 2011-10-01. | |
| Gem.all_partials called from /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:600. | |
| undefined method `specifications' for "/Users/seacreature/.rvm/gems/ruby-1.9.2-p180":String (NoMethodError) | |
| /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:425:in `block in each_load_path' | |
| /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:423:in `each' | |
| /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:423:in `each_load_path' | |
| /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:587:in `block in latest_load_paths' |
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
| $ ack Gem | |
| features/steps/rails_steps.rb | |
| 13: FileUtils.ln_sf(ENV["BUNDLE_GEMFILE"], "Gemfile") | |
| 14: FileUtils.ln_sf(ENV["BUNDLE_GEMFILE"] + ".lock", "Gemfile.lock") | |
| features/support/bundler_helpers.rb | |
| 6: command = "env RUBYOPT= BUNDLE_GEMFILE=Gemfile bundle install" | |
| 13: gemfile_lock = dir + "/Gemfile.lock" | |
| 14: gemfile = dir + "/Gemfile" | |
| 18: puts "Gemfile #{gemfile} has changed since it was locked. Re-locking..." |
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
| $ spork --bootstrap | |
| NOTE: Gem.latest_load_paths is deprecated with no replacement. It will be removed on or after 2011-10-01. | |
| Gem.latest_load_paths called from /Users/seacreature/.rvm/gems/ruby-1.9.2-p180/gems/spork-0.8.5/lib/spork.rb:112. | |
| NOTE: Gem.all_partials is deprecated with no replacement. It will be removed on or after 2011-10-01. | |
| Gem.all_partials called from /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:600. | |
| undefined method `specifications' for "/Users/seacreature/.rvm/gems/ruby-1.9.2-p180":String (NoMethodError) | |
| /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:425:in `block in each_load_path' | |
| /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:423:in `each' | |
| /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:423:in `each_load_path' | |
| /Users/seacreature/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:587:in `block in latest_load_paths' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 "minitest/autorun" | |
| # inspired by some code from Chris Wanstrath (shared w. me by Ryan Smith) | |
| # https://gist.github.com/25455 | |
| # | |
| # heavily modified by Gregory Brown at this point.. | |
| def context(*args, &block) | |
| return super unless (name = args.first) && block |
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 "minitest/autorun" | |
| require_relative "../lib/ivory_tower" | |
| require_relative "shared/allowed_units" | |
| # adopted from: https://gist.github.com/839034 | |
| def context(*args, &block) | |
| return super unless (name = args.first) && block | |
| context_class = Class.new(MiniTest::Unit::TestCase) do | |
| class << self |
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
| module PlayingCards | |
| class Card | |
| attr_accessor :rank, :suit | |
| def initialize(a_rank, a_suit) | |
| @rank = parse_rank a_rank | |
| @suit = parse_suit a_suit | |
| end | |