Sha256: e8681f369945a8ac607645aa45b131ff2e6a822a8cd9525a0746291a97432f83

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

require 'spec_helper'

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

  before(:all) do
    prepare_destination
    run_generator
  end

  after(:all) do
    FileUtils.rm_rf 'tmp'
  end

  describe "layout" do

    it "Generates admin and login layouts with js and css" do
      # check layouts
      assert_file "app/views/layouts/admin.html.haml"
      assert_file "app/views/layouts/login.html.haml"

      # check shared
      assert_file "app/views/admin/base/_launchbar.html.haml"
      assert_file "app/views/admin/base/_sidebar.html.haml"
      assert_file "app/views/admin/base/_header.html.haml"

      # check js and css
      assert_file "app/assets/javascripts/admin.js"
      assert_file "app/assets/stylesheets/admin/index.scss"

      #check images
      assert_directory "app/assets/images/admin"
      assert_directory "app/assets/javascripts/admin"
      assert_directory "app/assets/stylesheets/admin"
    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
redde-0.1.10 spec/generators/layout_generator_spec.rb
redde-0.1.9 spec/generators/layout_generator_spec.rb
redde-0.1.8 spec/generators/layout_generator_spec.rb
redde-0.1.7 spec/generators/layout_generator_spec.rb
redde-0.1.6 spec/generators/layout_generator_spec.rb
redde-0.1.5 spec/generators/layout_generator_spec.rb