Sha256: 93e427dd909450df303bc967ee6b9e6066ff44093ab7d3d673ea27afe9d45cb4

Contents?: true

Size: 881 Bytes

Versions: 70

Compression:

Stored size: 881 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 'helper'
require 'builder/xchar'

class TestNameCollisions < Builder::Test
  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

70 entries across 59 versions & 16 rubygems

Version Path
zuora_connect_ui-0.7.1 vendor/ruby/2.6.0/gems/builder-3.2.3/test/test_namecollision.rb
zuora_connect_ui-0.7.0 vendor/ruby/2.6.0/gems/builder-3.2.3/test/test_namecollision.rb
ric-0.13.0 vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_namecollision.rb
ric-0.12.2 vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_namecollision.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/builder-3.2.3/test/test_namecollision.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_namecollision.rb
cspeezy_palindrome-0.3.0 path/ruby/2.6.0/gems/builder-3.2.3/test/test_namecollision.rb
cspeezy_palindrome-0.2.0 path/ruby/2.6.0/gems/builder-3.2.3/test/test_namecollision.rb
cspeezy_palindrome-0.1.0 path/ruby/2.6.0/gems/builder-3.2.3/test/test_namecollision.rb
steenfest_palindrome-0.1.2 ruby/2.5/gems/builder-3.2.3/test/test_namecollision.rb
steenfest_palindrome-0.1.1b ruby/2.5/gems/builder-3.2.3/test/test_namecollision.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_namecollision.rb
nullifyable-0.1.0 vendor/bundle/gems/builder-3.2.3/test/test_namecollision.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_namecollision.rb
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/builder-3.2.3/test/test_namecollision.rb
dmurphy_palindrome-0.1.0 vendor/cache/ruby/2.3.0/gems/dmurphy_palindrome-0.1.0/vendor/cache/ruby/2.3.0/gems/builder-3.2.3/test/test_namecollision.rb
dmurphy_palindrome-0.1.0 vendor/cache/ruby/2.3.0/gems/builder-3.2.3/test/test_namecollision.rb
lgrgic_palindrome_detector-0.2.0 vendor/cache/gems/lgrgic_palindrome_detector-0.1.0/vendor/cache/gems/builder-3.2.3/test/test_namecollision.rb
lgrgic_palindrome_detector-0.2.0 vendor/cache/gems/builder-3.2.3/test/test_namecollision.rb
lgrgic_palindrome_detector-0.1.0 vendor/cache/gems/builder-3.2.3/test/test_namecollision.rb