blob: bfc5d04bedd9fd4d9ac7d093a06f438b396f8c5f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
require 'abstract_unit'
class RecordTagPost
extend ActiveModel::Naming
attr_accessor :id, :body
def initialize
@id = 45
@body = "What a wonderful world!"
yield self if block_given?
end
end
class RecordTagHelperTest < ActionView::TestCase
tests ActionView::Helpers::RecordTagHelper
def setup
super
@post = RecordTagPost.new
end
def test_content_tag_for
assert_raises(NoMethodError) { content_tag_for(:li, @post) }
end
def test_div_for
assert_raises(NoMethodError) { div_for(@post, class: "special") }
end
end
|