require 'test/unit'

if ENV['LEFTRIGHT']
  begin
    require 'leftright'
  rescue LoadError
    puts "Run `gem install leftright` to install leftright."
  end
end

require 'faraday'

begin
  require 'ruby-debug'
rescue LoadError
  # ignore
else
  Debugger.start
end

module Faraday
  class TestCase < Test::Unit::TestCase
    LIVE_SERVER = case ENV['LIVE']
      when /^http/ then ENV['LIVE']
      when nil     then nil
      else 'http://localhost:4567'
    end

    def test_default
      assert true
    end unless defined? ::MiniTest
  end
end

require 'webmock/test_unit'
WebMock.disable_net_connect!(:allow => Faraday::TestCase::LIVE_SERVER)

require 'rubygems'
require 'test/unit'

if ENV['LEFTRIGHT']
  begin
    require 'leftright'
  rescue LoadError
    puts "Run `gem install leftright` to install leftright."
  end
end

unless $LOAD_PATH.include? 'lib'
  $LOAD_PATH.unshift(File.dirname(__FILE__))
  $LOAD_PATH.unshift(File.join($LOAD_PATH.first, '..', 'lib'))
end
require 'faraday'

begin
  require 'ruby-debug'
rescue LoadError
  # ignore
else
  Debugger.start
end

module Faraday
  class TestCase < Test::Unit::TestCase
    LIVE_SERVER = case ENV['LIVE']
      when /^http/ then ENV['LIVE']
      when nil     then nil
      else 'http://localhost:4567'
    end

    def test_default
      assert true
    end unless defined? ::MiniTest
  end
end

require 'webmock/test_unit'
WebMock.disable_net_connect!(:allow => Faraday::TestCase::LIVE_SERVER)

--- 
+++ 
@@ -1,4 +1,3 @@
-require 'rubygems'
 require 'test/unit'
 
 if ENV['LEFTRIGHT']
@@ -9,10 +8,6 @@
   end
 end
 
-unless $LOAD_PATH.include? 'lib'
-  $LOAD_PATH.unshift(File.dirname(__FILE__))
-  $LOAD_PATH.unshift(File.join($LOAD_PATH.first, '..', 'lib'))
-end
 require 'faraday'
 
 begin
Remove unnecessary  and require 'rubygems'
