Sha256: 1b40cfb4ae5c906d6db9daa9d413e9446bb4f1360bce26063ac978aaf610d96e

Contents?: true

Size: 911 Bytes

Versions: 100

Compression:

Stored size: 911 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

#--
# 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

100 entries across 62 versions & 22 rubygems

Version Path
paynow_sdk-1.0.8 vendor/bundle/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.3 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.3 vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.2 vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.2 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.1 vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.1 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-1.0.0 vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb