Skip to content

Instantly share code, notes, and snippets.

# Take off the .rb extension when you use this - it's only to trick Gist into using the Ruby highlighter.
source :gemcutter
rails_version = "3.0.0.beta"
thin_version = "1.2.5"
gem "rails", rails_version
gem "thin", thin_version
module MyModule
def foo
puts "bar"
end
end
module Kernel
include MyModule
end
Before("@culerity,@celerity,@javascript") do |scenario|
unless @env_rvm_jruby
@env_rvm_jruby = {}
require 'yaml'
# NOTE: updated due to change in `rvm info` structure
# assumes JRuby 1.5, but no error checking if it's missing
rvm_info = YAML::load(`rvm info jruby`)['jruby-1.5.0']
rvm_info['environment'].each do |k, v|
@env_rvm_jruby[k] = v
end
25> ../Documents/Development/project-source/basic_rails_app % gem list
*** LOCAL GEMS ***
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
builder (2.1.2)
18> ../work-source/rspec/rspec/rspec-core % git config --listuser.email=ashley.moran@patchspace.co.ukuser.name=Ashley Moran
github.user=ashleymoran
github.token=
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=git://github.com/rspec/rspec-core.git
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
ENV["RAILS_ENV"] ||= "test"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
ruby-1.9.1-p378@twisty_lists:
system:
uname: "Darwin firedrake 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386"
shell: "bash"
version: "3.2.48(1)-release"
rvm:
version: "rvm 0.1.41 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]"
@ashmoran
ashmoran / Gemfile
Created July 14, 2010 09:27
Bundler 1.0.0.beta.5 won't load Aruba
source :rubygems
group :cucumber do
gem "cucumber"
gem "aruba"
end
contract "[Entity] Collection:" do |collection_name, item_name, class_name|
let(:item_class) { qualified_const_get(class_name) }
let(:collection_member_1) { mock(item_class, id: 1, update: :unexpected_not_nil) }
let(:collection_member_2) { mock(item_class, id: 2, update: :unexpected_not_nil) }
let(:collection_member_3) { mock(item_class, id: 3, update: :unexpected_not_nil) }
# TODO: Decide how to get the Representations
let(:collection_member_representation) { mock("#{class_name}::Representation") }
require 'rspec'
class Quiz
def self.answer(question)
42
end
end
# Test