spec/builders/epub_spec.rb in softcover-1.4.2 vs spec/builders/epub_spec.rb in softcover-1.4.3
- old
+ new
@@ -254,11 +254,11 @@
end
end
describe Softcover::EpubUtils do
let(:dummy_class) { Class.new { include Softcover::EpubUtils } }
- let(:title) { 'Foo Bar & Grill' }
+ let(:escaped_title) { 'Foo Bar & Grill' }
let(:uuid) { '550e8400-e29b-41d4-a716-446655440000' }
context "content.opf template" do
let(:copyright) { '2015' }
let(:author) { "Laurel & Hardy" }
@@ -266,12 +266,12 @@
let(:toc_chapters) { [] }
let(:manifest_chapters) { [] }
let(:images) { [] }
let(:template) do
- dummy_class.new.content_opf_template(title, copyright, author, uuid,
- cover_id, toc_chapters,
+ dummy_class.new.content_opf_template(escaped_title, copyright, author,
+ uuid, cover_id, toc_chapters,
manifest_chapters, images)
end
it "should have the right (escaped) content" do
expect(template).to include('Foo Bar & Grill')
@@ -283,11 +283,11 @@
end
context "toc.ncx template" do
let(:chapter_nav) { [] }
let(:template) do
- dummy_class.new.toc_ncx_template(title, uuid, chapter_nav)
+ dummy_class.new.toc_ncx_template(escaped_title, uuid, chapter_nav)
end
it "should have the right (escaped) content" do
expect(template).to include('Foo Bar & Grill')
expect(template).to include(uuid)
@@ -295,10 +295,10 @@
end
context "nav.xhtml template" do
let(:nav_list) { [] }
let(:template) do
- dummy_class.new.nav_html_template(title, nav_list)
+ dummy_class.new.nav_html_template(escaped_title, nav_list)
end
it "should have the right (escaped) content" do
expect(template).to include('Foo Bar & Grill')
end
\ No newline at end of file