Sha256: f5fe441aa4a1a93afc5e9adaf9278743f024afce03e9880b607e457e4c3eb4bf

Contents?: true

Size: 732 Bytes

Versions: 15

Compression:

Stored size: 732 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

15 entries across 15 versions & 1 rubygems

Version Path
volt-0.8.27.beta2 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.27.beta1 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.26.beta1 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.26 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.24 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.23 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.22 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.22.beta2 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.22.beta1 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.21 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.20 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.19 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.18 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.17 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.8.16 spec/templates/targets/binding_document/component_node_spec.rb