Sha256: 62f11383e29c337a47b52caf1d1075298563610220bf7da2a3fcda8ac0b5b8bb

Contents?: true

Size: 653 Bytes

Versions: 17

Compression:

Stored size: 653 Bytes

Contents

# encoding: utf-8

class Nanoc::PluginTest < MiniTest::Unit::TestCase

  include Nanoc::TestHelpers

  class SampleFilter < Nanoc::Filter
    identifier :_plugin_test_sample_filter
  end

  def test_named
    # Find existant filter
    filter = Nanoc::Filter.named(:erb)
    assert(!filter.nil?)

    # Find non-existant filter
    filter = Nanoc::Filter.named(:lksdaffhdlkashlgkskahf)
    assert(filter.nil?)
  end

  def test_register
    SampleFilter.send(:identifier, :_plugin_test_sample_filter)

    registry = Nanoc::PluginRegistry.instance
    filter = registry.find(Nanoc::Filter, :_plugin_test_sample_filter)

    refute_nil filter
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
nanoc-3.6.1 test/base/test_plugin.rb
nanoc-3.6.0 test/base/test_plugin.rb
nanoc-3.5.0 test/base/test_plugin.rb
nanoc-3.5.0b2 test/base/test_plugin.rb
nanoc-3.5.0b1 test/base/test_plugin.rb
nanoc-3.4.3 test/base/test_plugin.rb
nanoc-3.4.2 test/base/test_plugin.rb
nanoc-3.4.1 test/base/test_plugin.rb
nanoc-3.4.0 test/base/test_plugin.rb
nanoc-3.3.7 test/base/test_plugin.rb
nanoc-3.3.6 test/base/test_plugin.rb
nanoc-3.3.5 test/base/test_plugin.rb
nanoc-3.3.4 test/base/test_plugin.rb
nanoc-3.3.3 test/base/test_plugin.rb
nanoc-3.3.2 test/base/test_plugin.rb
nanoc-3.3.1 test/base/test_plugin.rb
nanoc-3.3.0 test/base/test_plugin.rb