Sha256: d96fc979b4fb5cf69a9985e17b783f3f4427e48359d5cf8a0ee04041b2118d18

Contents?: true

Size: 731 Bytes

Versions: 56

Compression:

Stored size: 731 Bytes

Contents

require 'volt/page/targets/binding_document/component_node'

describe Volt::ComponentNode do
  before do
    html = <<-END
    <!-- $0 -->Before  <!-- $1 -->Inside<!-- $/1 -->  After<!-- $/0 -->
    END

    @component = Volt::ComponentNode.new
    @component.html = html
  end

  it 'should find a component from a binding id' do
    expect(@component.find_by_binding_id(1).to_html).to eq('Inside')
    expect(@component.find_by_binding_id(0).to_html).to eq('Before  Inside  After')
  end

  # it "should render if blocks" do
  #   view = <<-END
  #   {#if _show}show{/} title
  #   END
  #
  #   page = Page.new
  #
  #   template = ViewParser.new(view, main/main/main/index/index/title')
  #
  #   page.add_template
  # end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
volt-0.9.5.pre2 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.5.pre1 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.4 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.4.pre5 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.4.pre3 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.4.pre2 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.4.pre1 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.3 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.3.pre6 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.3.pre5 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.3.pre4 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.3.pre3 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.3.pre2 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.3.pre1 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.2 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.1 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.1.pre5 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.1.pre4 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.1.pre3 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.9.1.pre2 spec/templates/targets/binding_document/component_node_spec.rb