Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 86536a4464
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.686 kb
require File.dirname(__FILE__) + '/abstract_unit'
class TagsHelperTest < Test::Unit::TestCase
fixtures :tags, :taggings, :posts
include TagsHelper
def test_tag_cloud
cloud_elements = []
tag_cloud Post.tag_counts, %w(css1 css2 css3 css4) do |tag, css_class|
cloud_elements << [tag, css_class]
end
assert_equal [
[tags(:good), "css2"],
[tags(:bad), "css1"],
[tags(:nature), "css4"],
[tags(:question), "css1"]
], cloud_elements
end
def test_tag_cloud_when_no_tags
tag_cloud SpecialPost.tag_counts, %w(css1) do
assert false, "tag_cloud should not yield"
end
end
end
Jump to Line
Something went wrong with that request. Please try again.