Sha256: b559536ab92fca2d65895fd2b9a182dd4ad8efaeacacd97a19598ec9a04372c3

Contents?: true

Size: 961 Bytes

Versions: 15

Compression:

Stored size: 961 Bytes

Contents

require_relative 'spec_helper'

describe SharedStrings do
  
  it "should return a shared string when provided with an index" do
    xml = Nokogiri::XML('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="2" uniqueCount="2"><si><t>This a second shared string</t><phoneticPr fontId="3" type="noConversion"/></si><si><r><t>This is, h</t></r><r><rPr><b/><sz val="10"/><rFont val="Verdana"/></rPr><t>opefully, the first</t></r><r><rPr><sz val="10"/><rFont val="Verdana"/></rPr><t xml:space="preserve"> shared string</t></r><phoneticPr fontId="3" type="noConversion"/></si></sst>')
    shared_strings = SharedStrings.instance
    shared_strings.clear
    shared_strings.load_strings_from_xml xml
    SharedStrings.shared_string_for(0).should == "This a second shared string"
    SharedStrings.shared_string_for(1).should == "This is, hopefully, the first shared string"
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rubyfromexcel-0.0.23 spec/shared_strings_spec.rb
rubyfromexcel-0.0.22 spec/shared_strings_spec.rb
rubyfromexcel-0.0.21 spec/shared_strings_spec.rb
rubyfromexcel-0.0.20 spec/shared_strings_spec.rb
rubyfromexcel-0.0.19 spec/shared_strings_spec.rb
rubyfromexcel-0.0.18 spec/shared_strings_spec.rb
rubyfromexcel-0.0.17 spec/shared_strings_spec.rb
rubyfromexcel-0.0.16 spec/shared_strings_spec.rb
rubyfromexcel-0.0.13 spec/shared_strings_spec.rb
rubyfromexcel-0.0.10 spec/shared_strings_spec.rb
rubyfromexcel-0.0.9 spec/shared_strings_spec.rb
rubyfromexcel-0.0.7 spec/shared_strings_spec.rb
rubyfromexcel-0.0.6 spec/shared_strings_spec.rb
rubyfromexcel-0.0.5 spec/shared_strings_spec.rb
rubyfromexcel-0.0.4 spec/shared_strings_spec.rb