Sha256: ff1f9147cb929a4a61ab257d04541ba3dfc83a59b986ed2291745f09ee7bf3ca

Contents?: true

Size: 1.03 KB

Versions: 4

Compression:

Stored size: 1.03 KB

Contents

require "spec_helper"

describe LucaApplication do
  let(:repo) { LucaApplication.new("tools") }
  let(:application_file_path) { File.join(repo.send(:coffeescripts_location),'tools_application.coffee') }

  it "should retrieve source code for a component" do
    source_length = repo.source_code_for_class("Tools.Application").length
    file_length = File.size( repo.find_definition_file_for_class('Tools.Application') )
    file_length.should be_within(5).of( source_length ) 
  end

  it "should map all component definitions to their respective files" do
    map = repo.component_definition_filemap
    map["Tools.Application"].should == application_file_path
  end

  xit "should find a template object by its filename" do
  end

  it "should find a component definition by class name" do
    repo.find_component_definition_for_class('Tools.Application').should be_present
    repo.find_component_definition_for_class('Tools.Collection').should be_present
  end

  it "should detect the namespace" do
    repo.namespace.should == "Tools"
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
luca-0.9.91 spec/lib/luca_application_spec.rb
luca-0.9.9 spec/lib/luca_application_spec.rb
luca-0.9.899 spec/lib/luca_application_spec.rb
luca-0.9.89 spec/lib/luca_application_spec.rb