Sha256: 32a1744eb44b6dc8337067a90e8f3fb6fdaf1b2c24d23b89d083a03e2ee8dafe

Contents?: true

Size: 1.85 KB

Versions: 6

Compression:

Stored size: 1.85 KB

Contents

require 'spec_helper'

describe Eyeballs::AppGenerator do
  
  describe "generate a simple app" do
    before(:all) do
      create_test_root
      FileUtils.cd(test_root)
      Eyeballs::AppGenerator.start('test')
    end
    let(:app_dir) { file('test', 'app') }
    let(:model_dir) { file('test', 'app', 'models') }
    let(:controller_dir) { file('test', 'app', 'controllers') }
    let(:view_dir) { file('test', 'app', 'views') }
    let(:config_dir) { file('test', 'config') }
    let(:vendor_dir) { file('test', 'vendor') }
    let(:jquery_dir) { file('test', 'vendor', 'jquery') }
    let(:eyeballs_dir) { file('test', 'vendor', 'eyeballs') }
    let(:mustache_dir) { file('test', 'vendor', 'mustache') }
    
    let(:jquery_file) { file('test', 'vendor', 'jquery', 'jquery-1.4.2.min.js') }
    let(:livequery_file) { file('test', 'vendor', 'jquery', 'jquery.livequery.js') }
    let(:mustache_file) { file('test', 'vendor', 'mustache', 'mustache.0.3.0.js') }
    let(:index_file) { file('test', 'index.html') }
    let(:initializer_file) { file('test', 'config', 'initializer.js')}
    let(:routes_file) { file('test', 'config', 'routes.js')}
    
    it "should create the test root" do
      File.exists?(test_root).should be_true
    end
    
    it "should create the test app dirs" do
      app_dir.should exist
      model_dir.should exist
      controller_dir.should exist
      view_dir.should exist
      config_dir.should exist
      vendor_dir.should exist
      jquery_dir.should exist
      eyeballs_dir.should exist
      mustache_dir.should exist
    end
    
    it "should create the app files" do
      jquery_file.should exist
      livequery_file.should_not exist
      mustache_file.should exist
      index_file.should exist
      initializer_file.should exist
      routes_file.should exist
    end
    
    after(:all) do
      remove_test_root
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
eyeballs-0.5.10.1 spec/app_generator_spec.rb
eyeballs-0.5.10 spec/app_generator_spec.rb
eyeballs-0.5.9 spec/app_generator_spec.rb
eyeballs-0.5.8.2 spec/app_generator_spec.rb
eyeballs-0.5.8.1 spec/app_generator_spec.rb
eyeballs-0.5.8 spec/app_generator_spec.rb