require 'spec_helper'
require 'magic_reveal/index_libber'
describe MagicReveal::IndexLibber do
subject { described_class.new html_text }
describe ".update_author" do
let(:html_text) { '' }
it "replaces the author" do
author = "Joe Cool #{rand 99}"
subject.update_author author
expect(subject.to_s).to match %r{content=.#{Regexp.quote author}.}
end
end
describe ".update_description" do
let(:html_text) { '' }
it "replaces the description" do
description = "#{rand 99} luft balloons"
subject.update_description description
expect(subject.html.at('meta').get_attribute('content')).to eq(description)
end
end
describe ".update_slides" do
let(:slides) { ' …is goodlife with Joe
text here\n" } its(:to_s) { should match %r{
\s*text here\s*
\s*} } its(:to_s) { should be_kind_of(String) } end end