Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CannotLayoutBinaryItem error (missing # before {}) #1058

Merged
merged 1 commit into from Jan 11, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+5 −2
Diff settings

Always

Just for now

Copy path View file
@@ -125,7 +125,7 @@ class CannotLayoutBinaryItem < Generic
# @param [Nanoc::Int::ItemRep] rep The item representation that was attempted
# to be laid out
def initialize(rep)
super("The “{rep.item.identifier}” item (rep “#{rep.name}”) cannot be laid out because it is a binary item. If you are getting this error for an item that should be textual instead of binary, make sure that its extension is included in the text_extensions array in the site configuration.")
super("The “#{rep.item.identifier}” item (rep “#{rep.name}”) cannot be laid out because it is a binary item. If you are getting this error for an item that should be textual instead of binary, make sure that its extension is included in the text_extensions array in the site configuration.")
end
end

@@ -383,7 +383,10 @@ def run(_content, params = {})
let(:content) { Nanoc::Int::BinaryContent.new(File.expand_path('donkey.md')) }

it 'raises' do
expect { subject }.to raise_error(Nanoc::Int::Errors::CannotLayoutBinaryItem)
expect { subject }.to raise_error(
Nanoc::Int::Errors::CannotLayoutBinaryItem,
'The “/index.md” item (rep “donkey”) cannot be laid out because it is a binary item. If you are getting this error for an item that should be textual instead of binary, make sure that its extension is included in the text_extensions array in the site configuration.',
)
end
end

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.