Sha256: 737f88bc4e9a3569e8b625ac0287c3eee0c728d9243cd7e5598cbf1047b469e6

Contents?: true

Size: 891 Bytes

Versions: 239

Compression:

Stored size: 891 Bytes

Contents

#!/usr/bin/env ruby

#--
# Portions copyright 2004 by Jim Weirich (jim@weirichhouse.org).
# Portions copyright 2005 by Sam Ruby (rubys@intertwingly.net).
# All rights reserved.

# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#++

require 'test/unit'
require 'builder/xchar'

class TestNameCollisions < Test::Unit::TestCase
  module Collide
    def xchr
    end
  end

  def test_no_collision
    assert_nothing_raised do
      Builder.check_for_name_collision(Collide, :not_defined)
    end
  end

  def test_collision
    assert_raise RuntimeError do
      Builder.check_for_name_collision(Collide, "xchr")
    end
  end

  def test_collision_with_symbol
    assert_raise RuntimeError do
      Builder.check_for_name_collision(Collide, :xchr)
    end
  end
end

Version data entries

239 entries across 207 versions & 46 rubygems

Version Path
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/builder-3.0.4/test/test_namecollision.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/builder-3.2.2/test/test_namecollision.rb
abaci-0.3.0 vendor/bundle/gems/builder-3.2.2/test/test_namecollision.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/builder-3.2.2/test/test_namecollision.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/builder-3.2.2/test/test_namecollision.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/builder-3.2.2/test/test_namecollision.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/builder-3.2.2/test/test_namecollision.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/builder-3.2.2/test/test_namecollision.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/builder-3.2.2/test/test_namecollision.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/builder-3.2.2/test/test_namecollision.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/builder-3.2.2/test/test_namecollision.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/builder-3.2.2/test/test_namecollision.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/builder-3.2.2/test/test_namecollision.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/builder-3.2.2/test/test_namecollision.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/builder-3.2.2/test/test_namecollision.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/builder-3.2.2/test/test_namecollision.rb
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/builder-3.2.2/test/test_namecollision.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/builder-3.2.2/test/test_namecollision.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/builder-3.2.2/test/test_namecollision.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/builder-3.2.2/test/test_namecollision.rb