Sha256: 8511937e6a37bc194076b1b0fbb31f379c01c7486dcaf7272f497eff42b8353b

Contents?: true

Size: 675 Bytes

Versions: 36

Compression:

Stored size: 675 Bytes

Contents

require 'test_helper'

module Schemacop
  module V2
    class NodeResolverTest < V2Test
      class ClassA; end
      class ClassB; end
      class ClassC; end
      class ClassD; end

      def test_insert_before
        prev_node_classes = NodeResolver.node_classes

        NodeResolver.node_classes = []

        NodeResolver.register(ClassA)
        NodeResolver.register(ClassB)
        NodeResolver.register(ClassC)
        NodeResolver.register(ClassD, before: ClassB)

        assert_equal [ClassA, ClassD, ClassB, ClassC],
                     NodeResolver.node_classes
      ensure
        NodeResolver.node_classes = prev_node_classes
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
schemacop-3.0.29 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.28 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.27 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.26 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.25 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.24 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.23 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.22 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.21 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.20 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.19 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.18 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.17 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.16 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.15 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.14 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.13 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.12 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.11 test/unit/schemacop/v2/node_resolver_test.rb
schemacop-3.0.10 test/unit/schemacop/v2/node_resolver_test.rb