Sha256: 6cf0a36a42c6b4a71736627336024c1bdcd48f642bfdc87fd92717bf28216b51

Contents?: true

Size: 757 Bytes

Versions: 19

Compression:

Stored size: 757 Bytes

Contents

require File.dirname(__FILE__) + "/../../spec_helper"

describe Radiant::Exporter do
  dataset :pages_with_layouts, :users_and_pages, :snippets

  before :each do
    @exporter = Radiant::Exporter
    @output = @exporter.export
    @hash = YAML::load(@output)
    @classes  = ['Radiant::Configs', 'Users', 'Pages', 'PageParts', 'Snippets', 'Layouts']
  end
  
  it "should output a string" do
    @output.should be_kind_of(String)
  end
  
  it "should output all Radiant models" do
    @classes.all? { |c| @hash.has_key?(c) }.should be_true
  end
  
  it "should output the models by id as hashes" do
    @hash['Pages'][page_id(:home)]['title'].should == pages(:home).title
    @hash['Users'][user_id(:admin)]['name'].should == users(:admin).name
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 spec/models/radiant/exporter_spec.rb
radiantcms-couchrest_model-0.2.2 spec/models/radiant/exporter_spec.rb
radiantcms-couchrest_model-0.2.1 spec/models/radiant/exporter_spec.rb
radiantcms-couchrest_model-0.2 spec/models/radiant/exporter_spec.rb
radiantcms-couchrest_model-0.1.9 spec/models/radiant/exporter_spec.rb
radiantcms-couchrest_model-0.1.8 spec/models/radiant/exporter_spec.rb
radiantcms-couchrest_model-0.1.7 spec/models/radiant/exporter_spec.rb
radiantcms-couchrest_model-0.1.6 spec/models/radiant/exporter_spec.rb
radiantcms-couchrest_model-0.1.5 spec/models/radiant/exporter_spec.rb
radiantcms-couchrest_model-0.1.4 spec/models/radiant/exporter_spec.rb
radiant-0.7.2 spec/models/radiant/exporter_spec.rb
radiant-0.9.1 spec/models/radiant/exporter_spec.rb
radiant-0.8.2 spec/models/radiant/exporter_spec.rb
radiant-0.9.0.rc2 spec/models/radiant/exporter_spec.rb
radiant-rc-0.9.0 spec/models/radiant/exporter_spec.rb
radiant-0.8.1 spec/models/radiant/exporter_spec.rb
radiant-0.7.0 spec/models/radiant/exporter_spec.rb
radiant-0.7.1 spec/models/radiant/exporter_spec.rb
radiant-0.8.0 spec/models/radiant/exporter_spec.rb