Sha256: b873793436687388536c361e61d0b0a6ef8d4acf62d7f6a1de14c50cb78a43b0

Contents?: true

Size: 1.57 KB

Versions: 2

Compression:

Stored size: 1.57 KB

Contents

module Skellington
  describe CLI do
    let :subject do
      described_class.new
    end

    it 'generates placeholders for static files' do
      expect { subject.generate 'dummy_app' }.to produce_file 'dummy_app/public/css/styles.css'
      expect(File).to exist 'dummy_app/public/js/dummy_app.js'
      expect(File).to exist 'dummy_app/public/assets/favicon.ico'
      expect('dummy_app/public/sass/styles.scss').to have_content (
      """
      @import 'bootstrap';
      @import 'variables';
      @import 'footer';
      @import 'github-corner';

      h1 {
        color: $brand-primary;
      }
      """
      )

      expect('dummy_app/public/sass/_variables.scss').to have_content (
      """
      $footer-height: 40px;
      $brand-primary: #fa8100;
      """
      )

      expect('dummy_app/public/sass/_footer.scss').to have_content (
      """
      html {
        position: relative;
        min-height: 100%;
      }

      body {
        margin-bottom: $footer-height;
      }

      .footer {
        position: absolute;
        bottom: 0;
        width: 100%;

        margin-top: $padding-large-vertical;
        background: $brand-primary;
        color: white;
        height: $footer-height;

        padding: $padding-large-vertical $padding-large-horizontal;

        a {
          color: white;
        }
      }
      """
      )

      expect('dummy_app/public/sass/_github-corner.scss').to have_content (
      """
      .octo-background {
        fill: $brand-primary;
      }

      .octo-arm, .octo-body {
        fill: white;
      }
      """
      )
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
skellington-0.7.3 spec/cli/public_spec.rb
skellington-0.7.2 spec/cli/public_spec.rb