Permalink
Browse files

Use Bundler

  • Loading branch information...
1 parent d497b32 commit 62cd1b470cdd741b1d49a4ff426e6fd29f001620 @webmat committed Dec 6, 2011
Showing with 54 additions and 10 deletions.
  1. +9 −0 Gemfile
  2. +20 −0 Gemfile.lock
  3. +7 −0 Rakefile
  4. +8 −1 lib/git_remote_branch.rb
  5. +10 −9 test/test_helper.rb
View
@@ -0,0 +1,9 @@
+source :rubygems
+
+gem 'rainbow'
+group :development do
+ gem 'rake'
+ gem 'test-unit'
+ gem 'shoulda'
+ gem 'mocha', :require => false # Must be loaded only after ActiveSupport::TestCase is defined
+end
View
@@ -0,0 +1,20 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ metaclass (0.0.1)
+ mocha (0.10.0)
+ metaclass (~> 0.0.1)
+ rainbow (1.1.3)
+ rake (0.9.2.2)
+ shoulda (2.11.3)
+ test-unit (2.4.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ mocha
+ rainbow
+ rake
+ shoulda
+ test-unit
View
@@ -1,4 +1,11 @@
require 'rubygems'
+begin
+ require 'bundler/setup'
+rescue Bundler::GemNotFound => e
+ STDERR.puts e.message
+ STDERR.puts "Try running `bundle install`."
+ exit!
+end
require 'rake'
View
@@ -1,6 +1,13 @@
require 'rubygems'
-gem 'rainbow', '~> 1.1.1'
+begin
+ require 'bundler/setup'
+rescue Bundler::GemNotFound => e
+ STDERR.puts e.message
+ STDERR.puts "Try running `bundle install`."
+ exit!
+end
+
require 'rainbow'
begin
View
@@ -1,21 +1,22 @@
require 'rubygems'
+begin
+ require 'bundler/setup'
+rescue Bundler::GemNotFound => e
+ STDERR.puts e.message
+ STDERR.puts "Try running `bundle install`."
+ exit!
+end
require 'test/unit'
-TEST_DIR = File.dirname(__FILE__)
-
-# Install version 2 the shoulda gem with
-# gem install thoughtbot-shoulda --source http://gems.github.com
-# Shoulda depends on ActiveSupport 2.0, so if you don't have Rails 2.x installed, install ActiveSupport before Shoulda:
-# gem install activesupport
-gem 'thoughtbot-shoulda', '~> 2.0'
require 'shoulda'
-gem 'mocha', '~> 0.5'
require 'mocha'
+TEST_DIR = File.dirname(__FILE__)
+
require File.join( [TEST_DIR] + %w{ .. lib git_remote_branch} )
require "#{TEST_DIR}/helpers/in_dir"
-Dir[TEST_DIR+'/helpers/**/*.rb'].each{|f| require f}
+Dir[TEST_DIR+'/helpers/**/*.rb'].each{|f| require f}
class Test::Unit::TestCase
include MoreAssertions

0 comments on commit 62cd1b4

Please sign in to comment.