Sha256: 22d68238c4c599e4c8094fef1d82a601822fc0531741bdd872c3497e99f95fe5

Contents?: true

Size: 607 Bytes

Versions: 4

Compression:

Stored size: 607 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

4 entries across 4 versions & 1 rubygems

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