Sha256: 627f79634570b949a3a46811a5f768ccdfb6cc849306658b4b752dff1e24996e

Contents?: true

Size: 614 Bytes

Versions: 15

Compression:

Stored size: 614 Bytes

Contents

# encoding: utf-8

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

    refute_nil filter
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
nanoc-3.7.4 test/base/test_plugin.rb
nanoc-3.7.3 test/base/test_plugin.rb
nanoc-3.7.2 test/base/test_plugin.rb
nanoc-3.7.1 test/base/test_plugin.rb
nanoc-3.7.0 test/base/test_plugin.rb
nanoc-3.6.11 test/base/test_plugin.rb
nanoc-3.6.10 test/base/test_plugin.rb
nanoc-3.6.9 test/base/test_plugin.rb
nanoc-3.6.8 test/base/test_plugin.rb
nanoc-3.6.7 test/base/test_plugin.rb
nanoc-3.6.6 test/base/test_plugin.rb
nanoc-3.6.5 test/base/test_plugin.rb
nanoc-3.6.4 test/base/test_plugin.rb
nanoc-3.6.3 test/base/test_plugin.rb
nanoc-3.6.2 test/base/test_plugin.rb