Sha256: 4d208f0a1d2e6ee96b7ee17b42c9f83b4c6438d95c277cac3e32b1ac5188b64b

Contents?: true

Size: 585 Bytes

Versions: 5

Compression:

Stored size: 585 Bytes

Contents

# frozen_string_literal: true

require_relative "../helper"

module Arel
  class TestNode < Arel::Test
    def test_includes_factory_methods
      assert Arel::Nodes::Node.new.respond_to?(:create_join)
    end

    def test_all_nodes_are_nodes
      Nodes.constants.map { |k|
        Nodes.const_get(k)
      }.grep(Class).each do |klass|
        next if Nodes::SqlLiteral == klass
        next if Nodes::BindParam == klass
        next if /^Arel::Nodes::(?:Test|.*Test$)/.match?(klass.name)
        assert klass.ancestors.include?(Nodes::Node), klass.name
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ibm_db-5.5.0 test/cases/arel/nodes/node_test.rb
ibm_db-5.4.1 test/cases/arel/nodes/node_test.rb
ibm_db-5.4.0 test/cases/arel/nodes/node_test.rb
ibm_db-5.3.2 test/cases/arel/nodes/node_test.rb
ibm_db-5.3.1 test/cases/arel/nodes/node_test.rb