Sha256: f38bcde909933e1152bf1d29733a0b5e8ede4e9da321e55d419166e492123134

Contents?: true

Size: 813 Bytes

Versions: 7

Compression:

Stored size: 813 Bytes

Contents

require 'volt/server/rack/component_files'

describe ComponentFiles do
  before do
    spec_app_root = File.join(File.dirname(__FILE__), "../..")
    
    path_to_main = File.join(File.dirname(__FILE__), "../../app/main")
    @component_paths = ComponentPaths.new(spec_app_root)
  end
  
  it "should return the dependencies list" do
    main = ComponentFiles.new("main", @component_paths)
    
    components = main.components
    expect(components).to eq(['main', 'shared', 'bootstrap', "slideshow"])
  end
  
  it "should list all JS files" do
    main = ComponentFiles.new("main", @component_paths)
    
    expect(main.javascript_files).to eq(["/assets/js/test2.js", "/assets/js/bootstrap.js", "/assets/volt/templates/page.js", "/components/home.js", "/assets/js/test3.js", "/assets/js/test1.js"])
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
volt-0.3.5 spec/server/rack/component_files_spec.rb
volt-0.3.4 spec/server/rack/component_files_spec.rb
volt-0.3.3 spec/server/rack/component_files_spec.rb
volt-0.3.2 spec/server/rack/component_files_spec.rb
volt-0.3.1 spec/server/rack/component_files_spec.rb
volt-0.3.0 spec/server/rack/component_files_spec.rb
volt-0.2.9 spec/server/rack/component_files_spec.rb