Sha256: a492e455194fd8854352d75fb97a7e5e810dce9b076ef0a08a95c0c1735ee440

Contents?: true

Size: 598 Bytes

Versions: 40

Compression:

Stored size: 598 Bytes

Contents

class Nanoc::PluginTest < Nanoc::TestCase
  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::Int::PluginRegistry.instance
    filter = registry.find(Nanoc::Filter, :_plugin_test_sample_filter)

    refute_nil filter
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
nanoc-4.1.6 test/base/test_plugin.rb
nanoc-4.2.0b1 test/base/test_plugin.rb
nanoc-4.1.5 test/base/test_plugin.rb
nanoc-4.1.4 test/base/test_plugin.rb
nanoc-4.1.3 test/base/test_plugin.rb
nanoc-4.1.2 test/base/test_plugin.rb
nanoc-4.1.1 test/base/test_plugin.rb
nanoc-4.1.0 test/base/test_plugin.rb
nanoc-4.1.0rc2 test/base/test_plugin.rb
nanoc-4.1.0rc1 test/base/test_plugin.rb
nanoc-4.1.0b1 test/base/test_plugin.rb
nanoc-4.1.0a1 test/base/test_plugin.rb
nanoc-4.0.2 test/base/test_plugin.rb
nanoc-4.0.1 test/base/test_plugin.rb
nanoc-4.0.0 test/base/test_plugin.rb
nanoc-4.0.0rc3 test/base/test_plugin.rb
nanoc-4.0.0rc2 test/base/test_plugin.rb
nanoc-4.0.0rc1 test/base/test_plugin.rb
nanoc-4.0.0b4 test/base/test_plugin.rb
nanoc-4.0.0b3 test/base/test_plugin.rb