Sha256: 7424bcd1c83ace118bca75da61c1e51956e28b7b98e17ca10e4d30b45900b270

Contents?: true

Size: 607 Bytes

Versions: 2

Compression:

Stored size: 607 Bytes

Contents

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

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

class TC_BuildersRss < Test::Unit::TestCase # :nodoc: all

	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 = N::RssBuilder.render(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.10.0 test/nitro/builders/tc_rss.rb
nitro-0.9.5 test/nitro/builders/tc_rss.rb