require 'spec_helper' class HelperSettings def self.description 'description' end end class Item def description 'item_description' end end describe 'render_description' do it 'simple' do expect(render_description).to eq('') end it '@description' do @description = '@description' expect(render_description).to eq('') [' ', '', nil].each do |desc| @description = desc expect(render_description).to eq('') end end it '@item' do @item = Item.new expect(render_description).to eq('') end it 'opts' do expect(render_description(description: 'opts')).to eq('') end end