require 'faster_rubygems' if RUBY_VERSION < '1.9' require 'sane' require_relative '../lib/faster_gem_scripts' require 'spec/autorun' require 'fileutils' describe "faster rubygems" do def setup File.delete 'abc' if File.exist?('abc') FileUtils.touch 'abc' FasterGemScripts.overwrite 'abc' end it "should overwrite a file" do setup new_contents = File.read('abc') assert new_contents.contain?("faster_rubygems") end it "should nuke the old cache on re-write" do require 'fileutils' FileUtils.touch 'abc_bin_location' setup assert !File.exist?('abc_bin_location') end it "should overwrite on gem install" end