Sha256: 6be75bf69836630bbe07ff13164793b1fb7ac980381265a234ec3121fd5bad9c

Contents?: true

Size: 1.49 KB

Versions: 16

Compression:

Stored size: 1.49 KB

Contents

require "spec_helper"

describe ArchitectureJS do  
  it 'should have a base_directory constant' do
    ArchitectureJS::base_directory.should_not be_nil
  end
  
  it 'should have a lib_directory constant' do
    ArchitectureJS::lib_directory.should_not be_nil
  end
  
  it 'should have a lib_directory' do
    ArchitectureJS::lib_directory.should_not be_nil
  end
  
  it 'should have the correct VERSION' do
    version = File.open("#{ArchitectureJS::base_directory}/VERSION").read
    ArchitectureJS::VERSION.should === version
  end

  it 'should have a BLUEPRINTS constant' do
    ArchitectureJS::BLUEPRINTS.should_not be_nil
  end

  context "Instantiation with a config file" do

   before :each do
     FileUtils.mkdir("#{TMP_DIR}")
     FileUtils.cp "#{FIXTURES}/existing.blueprint", "#{TMP_DIR}/myapp.blueprint"
     suppress_output { @project = ArchitectureJS::Blueprint.new_from_config(TMP_DIR) }
   end

   after :each do
     FileUtils.rm_rf "#{TMP_DIR}" if File.exists? "#{TMP_DIR}"
   end

   it "should raise an error if there is no .blueprint file" do
     FileUtils.rm_rf "#{TMP_DIR}/myapp.blueprint"
     lambda { ArchitectureJS::Blueprint.new_from_config TMP_DIR }.should raise_error
   end

   it 'should set defaults from config file' do
     @project.config.should == {
       blueprint: 'default',
       src_dir: 'source',
       build_dir: 'dest',
       asset_root: '../',
       output: 'compressed',
       name: 'test',
     }
   end

  end # Instantiation with an existing config file
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
architecture-js-0.5.8 spec/architecture-js_spec.rb
architecture-js-0.5.7 spec/architecture-js_spec.rb
architecture-js-0.5.6 spec/architecture-js_spec.rb
architecture-js-0.5.5 spec/architecture-js_spec.rb
architecture-js-0.5.4 spec/architecture-js_spec.rb
architecture-js-0.5.3 spec/architecture-js_spec.rb
architecture-js-0.5.2 spec/architecture-js_spec.rb
architecture-js-0.5.1 spec/architecture-js_spec.rb
architecture-js-0.5.0 spec/architecture-js_spec.rb
architecture-js-0.4.0 spec/architecture-js_spec.rb
architecture-js-0.3.8 spec/architecture-js_spec.rb
architecture-js-0.3.7 spec/architecture-js_spec.rb
architecture-js-0.3.6 spec/architecture-js_spec.rb
architecture-js-0.3.5 spec/architecture-js_spec.rb
architecture-js-0.3.4 spec/architecture-js_spec.rb
architecture-js-0.3.3 spec/architecture-js_spec.rb