Sha256: c1f7d645e08a9905c5883cd91a326b11ab89a924e097528e54df7a98efe34c26

Contents?: true

Size: 497 Bytes

Versions: 13

Compression:

Stored size: 497 Bytes

Contents

require 'volt/templates/targets/binding_document/component_node'

describe ComponentNode do
  before do
    html = <<-END
    <!-- $0 -->Before  <!-- $1 -->Inside<!-- $/1 -->  After<!-- $/0 -->
    END
    
    @component = 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
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
volt-0.3.7 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.3.6 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.3.5 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.3.4 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.3.3 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.3.2 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.3.1 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.3.0 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.2.9 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.2.7 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.2.5 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.2.4 spec/templates/targets/binding_document/component_node_spec.rb
volt-0.2.3 spec/templates/targets/binding_document/component_node_spec.rb