Sha256: 9de3e2d763318455d175f468d7ebec42145f0c9eaac4e7539eaac8d0f63e7a3e
Contents?: true
Size: 848 Bytes
Versions: 2
Compression:
Stored size: 848 Bytes
Contents
require 'spec_helper' class Item def description 'item_description' end end describe 'render_description' do before do Rails.application.secrets[:description] = 'description' end it 'simple' do expect(render_description).to eq('<meta name="description" content="description" />') end it '@description' do @description = '@description' expect(render_description).to eq('<meta name="description" content="@description" />') [' ', '', nil].each do |desc| @description = desc expect(render_description).to eq('') end end it '@item' do @item = Item.new expect(render_description).to eq('<meta name="description" content="item_description" />') end it 'opts' do expect(render_description(description: 'opts')).to eq('<meta name="description" content="opts" />') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
h2ocube_rails_helper-0.2.1 | spec/helpers/render_description_spec.rb |
h2ocube_rails_helper-0.2.0 | spec/helpers/render_description_spec.rb |