1 require File.dirname(__FILE__) + '/../../test_helper'
2 require 'radiant/exporter'
4 class Radiant::ExporterTest < Test::Unit::TestCase
5 fixtures :users, :pages, :page_parts, :snippets, :layouts
8 @exporter = Radiant::Exporter
9 @output = @exporter.export
10 @hash = YAML::load(@output)
11 @classes = ['Radiant::Configs', 'Users', 'Pages', 'PageParts', 'Snippets', 'Layouts']
14 def test_export_is_string
15 assert_kind_of String, @output
17 def test_export_classes
18 @classes.each do |expected|
19 assert @hash.keys.include?(expected), "expected hash to contain <#{expected.inspect}> but it did not"
22 def test_export_homepage
23 assert_equal 'Ruby Home Page', @hash['Pages'][1]['title']
24 assert_equal 'Admin User', @hash['Users'][3]['name']