Sha256: d78ca419b728b7fe501966b8b319d1ceee021c19ceb50a8c27edb44ddeb38007

Contents?: true

Size: 540 Bytes

Versions: 2

Compression:

Stored size: 540 Bytes

Contents

require 'test_helper'

class TitleTagTest < ActionView::TestCase
  include Metamagic::ViewHelper

  test "title tag" do
    meta title: "My Title"

    assert_equal %{<title>My Title</title>},
                 metamagic
  end

  test "shortcut helper" do
    title "My Title"

    assert_equal %{<title>My Title</title>},
                 metamagic
  end

  test "nil title" do
    title nil
    description "Test description"

    assert_equal %{<meta content="Test description" name="description" />},
                 metamagic
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
metamagic-3.0.3 test/title_tag_test.rb
metamagic-3.0.2 test/title_tag_test.rb