Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix finding root class in PluginRegistry
- Loading branch information
1 parent
43fd291
commit 39a0c5a
Showing
3 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
describe Nanoc::Int::PluginRegistry do | ||
describe '.identifier(s)' do | ||
let(:identifier) { :ce79f6b8ddb22233e9aaf7d8f011689492acf02f } | ||
|
||
context 'direct subclass' do | ||
example do | ||
klass = | ||
Class.new(Nanoc::Filter) do | ||
identifier :plugin_registry_spec | ||
end | ||
|
||
expect(klass.identifier).to eql(:plugin_registry_spec) | ||
end | ||
end | ||
|
||
context 'indirect subclass' do | ||
example do | ||
superclass = Class.new(Nanoc::Filter) | ||
|
||
klass = | ||
Class.new(superclass) do | ||
identifier :plugin_registry_spec | ||
end | ||
|
||
expect(klass.identifier).to eql(:plugin_registry_spec) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
describe 'GH-928', site: true, stdio: true do | ||
example do | ||
expect { Nanoc::CLI.run(%w(check --list)) }.to output(%r{^ css$}).to_stdout | ||
end | ||
end |