Sha256: 2b0a5cbc3bdba7cef18decf30981af605957fcfa83e4b552d7ffc13fd0ac0e48

Contents?: true

Size: 980 Bytes

Versions: 4

Compression:

Stored size: 980 Bytes

Contents

if RUBY_PLATFORM != 'opal'
  require 'volt/server/rack/asset_files'

  describe AssetFiles do
    before do
      spec_app_root = File.join(File.dirname(__FILE__), "../../apps/file_loading")

      path_to_main = File.join(File.dirname(__FILE__), "../../apps/file_loading/app/main")
      @component_paths = ComponentPaths.new(spec_app_root)
    end

    it "should return the dependencies list" do
      main = AssetFiles.new("main", @component_paths)

      components = main.components
      expect(components).to eq(['volt', 'main', 'shared', 'bootstrap', "slideshow"])
    end

    it "should list all JS files" do
      main = AssetFiles.new("main", @component_paths)

      expect(main.javascript_files(nil)).to eq(["/assets/js/jquery-2.0.3.js", "/assets/js/sockjs-0.3.4.min.js", "/assets/js/vertxbus.js", "/assets/js/bootstrap.js", "/assets/js/test2.js", "/assets/js/test3.js", "/assets/js/test1.js", "/assets/volt/page/page.js", "/components/home.js"])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
volt-0.7.5 spec/server/rack/asset_files_spec.rb
volt-0.7.4 spec/server/rack/asset_files_spec.rb
volt-0.7.3 spec/server/rack/asset_files_spec.rb
volt-0.7.2 spec/server/rack/asset_files_spec.rb