Sha256: cd214e25607e3e04b6223fd43223eb5092e1ff526156afd50b5ccdeec3cbb750

Contents?: true

Size: 1.38 KB

Versions: 20

Compression:

Stored size: 1.38 KB

Contents

require 'spec_helper'
require "generators/sunrise/install_generator"
require 'fileutils'

describe Sunrise::Generators::InstallGenerator do
  include GeneratorSpec::TestCase
  destination File.expand_path("../../tmp", __FILE__)
#  arguments %w(something)

  before(:all) do
    prepare_destination
    
    dir = File.expand_path("../../", __FILE__)
    FileUtils.mkdir_p(File.join(dir, "tmp/config"))
    FileUtils.copy_file(File.join(dir, "dummy/config/routes.rb"), File.join(dir, "tmp/config", "routes.rb"))
    FileUtils.copy_file(File.join(dir, "dummy/config/application.rb"), File.join(dir, "tmp/config", "application.rb"))
    
    run_generator
  end
  
  it "should copy_views" do
    assert_directory "app/views/pages"
    assert_directory "app/views/shared"
    assert_file "app/views/pages/show.html.erb"
    assert_file "app/views/shared/_notice.html.erb"
  end
  
  it "should copy_configurations" do
    ["db/seeds.rb", "config/initializers/sunrise.rb", "config/database.yml.sample",
     "config/logrotate-config.sample", "config/nginx-config.sample"].each do |file|
      assert_file file
    end
  end
  
  it "should copy_models" do
    assert_directory "app/models/defaults"
    assert_directory "app/models/sunrise"
    assert_directory "app/uploaders"
  end

  it "should copy_specs" do
    assert_directory "spec"
    assert_file "spec/spec_helper.rb"
    assert_file ".rspec"
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
sunrise-cms-0.6.10 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.9 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.8 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.7 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.6 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.5 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.4 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.3 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.2 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.1 spec/generators/install_generator_spec.rb
sunrise-cms-0.6.0 spec/generators/install_generator_spec.rb
sunrise-cms-0.5.3 spec/generators/install_generator_spec.rb
sunrise-cms-0.5.2 spec/generators/install_generator_spec.rb
sunrise-cms-0.5.1 spec/generators/install_generator_spec.rb
sunrise-cms-0.5.0 spec/generators/install_generator_spec.rb
sunrise-cms-0.5.0.rc5 spec/generators/install_generator_spec.rb
sunrise-cms-0.5.0.rc4 spec/generators/install_generator_spec.rb
sunrise-cms-0.5.0.rc3 spec/generators/install_generator_spec.rb
sunrise-cms-0.5.0.rc2 spec/generators/install_generator_spec.rb
sunrise-cms-0.5.0.rc1 spec/generators/install_generator_spec.rb