blob: f1e0ce1ea97153d73135d24540acb3377070d1e7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# frozen_string_literal: true
require_relative "../helper"
module Arel
class TestNode < Arel::Test
def test_includes_factory_methods
assert 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 klass.name =~ /^Arel::Nodes::(?:Test|.*Test$)/
assert klass.ancestors.include?(Nodes::Node), klass.name
end
end
end
end
|