Sha256: c2da0eb6aa6388d5ac7e087bcd313615956574c97c9ebcf16230cb78b5b8a801

Contents?: true

Size: 807 Bytes

Versions: 38

Compression:

Stored size: 807 Bytes

Contents

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

  describe ComponentPaths 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 paths to all app folders" do
      match_count = 0
      @component_paths.app_folders do |app_folder|
        if app_folder[/spec\/app$/] || app_folder[/spec\/vendor\/app$/]
          match_count += 1
        end
      end
    
      expect(match_count).to eq(2)
    end
  
    it "should return the path to a component" do
      main_path = @component_paths.component_path('main')
      expect(main_path).to match(/spec\/app\/main$/)
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
volt-0.6.1 spec/server/rack/component_paths_spec.rb
volt-0.6.0 spec/server/rack/component_paths_spec.rb
volt-0.5.18 spec/server/rack/component_paths_spec.rb
volt-0.5.17 spec/server/rack/component_paths_spec.rb
volt-0.5.16 spec/server/rack/component_paths_spec.rb
volt-0.5.15 spec/server/rack/component_paths_spec.rb
volt-0.5.14 spec/server/rack/component_paths_spec.rb
volt-0.5.13 spec/server/rack/component_paths_spec.rb
volt-0.5.12 spec/server/rack/component_paths_spec.rb
volt-0.5.11 spec/server/rack/component_paths_spec.rb
volt-0.5.10 spec/server/rack/component_paths_spec.rb
volt-0.5.9 spec/server/rack/component_paths_spec.rb
volt-0.5.8 spec/server/rack/component_paths_spec.rb
volt-0.5.7 spec/server/rack/component_paths_spec.rb
volt-0.5.6 spec/server/rack/component_paths_spec.rb
volt-0.5.4 spec/server/rack/component_paths_spec.rb
volt-0.5.3 spec/server/rack/component_paths_spec.rb
volt-0.5.2 spec/server/rack/component_paths_spec.rb
volt-0.5.1 spec/server/rack/component_paths_spec.rb
volt-0.5.0 spec/server/rack/component_paths_spec.rb