Sha256: aa135383d16bd4a1fa039f010cf5558827e95e2db9995331ae704b75548c6aaf

Contents?: true

Size: 1.34 KB

Versions: 11

Compression:

Stored size: 1.34 KB

Contents

require 'spec_helper'

describe Calatrava::Shell do
  include Aruba::Api

  let(:shell) { Calatrava::Shell.new(current_dir) }

  before(:each) do
    create_dir 'shell/support'
    write_file 'shell/support/shell.coffee', ''
    write_file 'shell/support/fragment.haml', ''
    create_dir 'shell/pages/example'
    write_file 'shell/pages/example/page.coffee', ''
    write_file 'shell/pages/example/page.haml', ''

    create_dir 'shell/stylesheets'
    write_file 'shell/stylesheets/shell.css', ''
    write_file 'shell/stylesheets/template.sass', ''
  end

  context 'coffee files' do
    subject { shell.coffee_files }

    it { should include 'shell/support/shell.coffee' }
  end

  context 'haml files' do
    subject { shell.haml_files }

    it { should include 'shell/support/fragment.haml' }
  end

  context 'css files' do
    subject { shell.css_files }
    
    it { should include 'shell/stylesheets/shell.css' }
    it { should include 'shell/stylesheets/template.sass' }
  end

  context 'features' do
    subject { shell.features }

    it { should have(1).feature }

    context 'a single feature' do
      subject { shell.features[0] }

      it { should include :name => 'example' }
      it { should include :coffee => ['shell/pages/example/page.coffee'] }
      it { should include :haml => ['shell/pages/example/page.haml'] }
    end
  end
  
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
calatrava-0.6.10 spec/shell_spec.rb
calatrava-0.6.9 spec/shell_spec.rb
calatrava-0.6.8 spec/shell_spec.rb
calatrava-0.6.7 spec/shell_spec.rb
calatrava-0.6.6 spec/shell_spec.rb
calatrava-0.6.5 spec/shell_spec.rb
calatrava-0.6.4 spec/shell_spec.rb
calatrava-0.6.3 spec/shell_spec.rb
calatrava-0.6.2 spec/shell_spec.rb
calatrava-0.6.1 spec/shell_spec.rb
calatrava-0.6.0 spec/shell_spec.rb