Sha256: 8aacab5c57e06ef27d09a1b30412465865374bed5da8032cda86e71314e669bc
Contents?: true
Size: 1.15 KB
Versions: 3
Compression:
Stored size: 1.15 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 `mkdir tmp/config; touch tmp/config/routes.rb; echo "Rails.application.routes.draw do\nend" > tmp/config/routes.rb` 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
redde-0.1.13 | spec/generators/layout_generator_spec.rb |
redde-0.1.12 | spec/generators/layout_generator_spec.rb |
redde-0.1.11 | spec/generators/layout_generator_spec.rb |