require 'middleman-hatenastar/generator'
RSpec.describe 'Middleman::Hatenastar::Generator' do
describe '#generate' do
let(:option) do
{
token: 'token-string',
uri: 'h2.uri',
title: 'h2.title',
container: 'h2.container',
entry_node: 'section.node'
}
end
let(:generator) { ::Middleman::Hatenastar::Generator.new(option) }
context 'non-overwrite configure' do
it 'should generate hatenastar tag' do
expect(generator.generate).to eq <<~TAG
TAG
end
end
context 'overwrite configure' do
let(:another_option) do
{
uri: 'h2.uri-another',
title: 'h2.title-another',
container: 'h2.container-another',
entry_node: 'section.node-another'
}
end
it 'should generate overwrited hatenastar tag' do
expect(generator.generate(another_option)).to eq <<~TAG
TAG
end
end
end
end