Sha256: f30aba66d49b81c99df3e2ddc39bdcd9e44f9c070f61b350d96037210b0c931a

Contents?: true

Size: 741 Bytes

Versions: 2

Compression:

Stored size: 741 Bytes

Contents

require 'test_helper'

class RenderDescriptionClass < ActionView::TestCase
  test 'simple' do
    assert_equal render_description, '<meta name="description" content="description" />'
  end
  
  test '@description' do
    @description = '@description'
    assert_equal render_description, '<meta name="description" content="@description" />'
    ['   ', '', nil].each do |desc|
      @description = desc
      assert_equal render_description, ''
    end
  end
  
  test '@item' do
    @item = Item.new
    assert_equal render_description, '<meta name="description" content="item_description" />'
  end
end

class HelperSettings
  def self.description
    'description'
  end
end

class Item
  def description
    'item_description'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
h2ocube_rails_helper-0.0.8 test/render_description_test.rb
h2ocube_rails_helper-0.0.7 test/render_description_test.rb