require_relative 'spec_helper' describe SharedStrings do it "should return a shared string when provided with an index" do xml = Nokogiri::XML(' This a second shared stringThis is, hopefully, the first shared string') 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