Sha256: 7acb68a99e5090acbf69b5878140629e03d21e3ffd5fdedadc4e2b4bf00cacaa

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')

require 'test/unit'
require 'nitro/builders/rss'

class TC_BuildersRss < Test::Unit::TestCase # :nodoc: all
	include Nitro
	
	Blog = Struct.new(:title, :body, :view_uri)

	def test_render
		blogs = []
		blogs << Blog.new('Hello1', 'World1', 'uri1');
		blogs << Blog.new('Hello2', 'World2', 'uri2');
		blogs << Blog.new('Hello3', 'World3', 'uri3');

		rss = RssBuilder.build(blogs, :link => 'http://www.navel.gr')

		assert_match %r{<link>http://www.navel.gr/uri1</link>}, rss
		assert_match %r{<link>http://www.navel.gr/uri2</link>}, rss
	end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.16.0 test/nitro/builders/tc_rss.rb
nitro-0.17.0 test/nitro/builders/tc_rss.rb