Sha256: 2672bdd72c8e879572847b587beae7e1ec7f1c8d0b9e375b555cca93225a47a5

Contents?: true

Size: 651 Bytes

Versions: 3

Compression:

Stored size: 651 Bytes

Contents

require File.join(File.dirname(__FILE__), 'test_helper')

class LocalGem::OverrideTest < Test::Unit::TestCase
  before(:all) { require 'local_gem/override' }
  test "gem calls old_gem and load_local_gem" do
    LocalGem::Singleton.expects(:load_local_gem).once
    self.expects(:old_gem).once
    gem('blah')
  end

  test "require calls old_require and load_local_gem" do
    LocalGem::Singleton.expects(:load_local_gem).once
    self.expects(:old_require).once
    require('blah')
  end

  test "loading override should have included LocalGem in self" do
   assert self.instance_eval("class<<self; self; end").ancestors.include?(LocalGem)
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
cldwalker-local_gem-0.1.1 test/override_test.rb
cldwalker-local_gem-0.1.2 test/override_test.rb
local_gem-0.1.3 test/override_test.rb