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
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/builder-3.3.0/test/test_namecollision.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/builder-3.3.0/test/test_namecollision.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/builder-3.2.4/test/test_namecollision.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/builder-3.2.4/test/test_namecollision.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/builder-3.2.4/test/test_namecollision.rb
katalyst-govuk-formbuilder-1.9.2 vendor/bundle/ruby/3.3.0/gems/builder-3.3.0/test/test_namecollision.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/builder-3.3.0/test/test_namecollision.rb
builder-3.3.0 test/test_namecollision.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/builder-3.2.4/test/test_namecollision.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/builder-3.2.4/test/test_namecollision.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_namecollision.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_namecollision.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_namecollision.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_namecollision.rb
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/builder-3.2.4/test/test_namecollision.rb
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/builder-3.2.4/test/test_namecollision.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/builder-3.2.4/test/test_namecollision.rb