Renamed helpers to correspond to renamed Controller classes.
[merb_radiant.git] / radiant_specs / test / unit / radiant / .svn / text-base / exporter_test.rb.svn-base
bloba4c8e3766b4160bcbbc8cca7cef947916472ea51
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
6   
7   def setup
8     @exporter = Radiant::Exporter
9     @output   = @exporter.export
10     @hash     = YAML::load(@output)
11     @classes  = ['Radiant::Configs', 'Users', 'Pages', 'PageParts', 'Snippets', 'Layouts']
12   end
13   
14   def test_export_is_string
15     assert_kind_of String, @output
16   end
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"
20     end
21   end
22   def test_export_homepage
23     assert_equal 'Ruby Home Page', @hash['Pages'][1]['title']
24     assert_equal 'Admin User',  @hash['Users'][3]['name']
25   end
26 end