Sha256: 59ae3791ebf2be4a966629eb1fc3c2dde6a94120327f40ee316da5ec698966b6

Contents?: true

Size: 551 Bytes

Versions: 12

Compression:

Stored size: 551 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'


describe RTurk::XMLUtilities do
  
  before(:all) do
    class XMLTest
      include RTurk::XMLUtilities
      def xml
      <<-XML
      <foo>
        <bar>
          <baz>
            <fuck>content!!!</fuck>
          </baz>
        </bar>
      </foo>
      XML
      end
      def parse
        xml_to_hash(Nokogiri::XML(xml))
      end
    end
  end
  
  it "should parse a answer" do
    
    XMLTest.new.parse.should eql({'foo' => { 'bar' => {'baz' => {'fuck' => 'content!!!'}}}})
  end

  
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rturk-2.3.4 spec/xml_parse_spec.rb
rturk-2.3.3 spec/xml_parse_spec.rb
rturk-2.3.2 spec/xml_parse_spec.rb
rturk-2.3.1 spec/xml_parse_spec.rb
rturk-2.3.0 spec/xml_parse_spec.rb
rturk-2.2.1 spec/xml_parse_spec.rb
rturk-2.2.0 spec/xml_parse_spec.rb
rturk-2.1.1 spec/xml_parse_spec.rb
rturk-2.1.0 spec/xml_parse_spec.rb
rturk-2.0.5 spec/xml_parse_spec.rb
rturk-2.0.4 spec/xml_parse_spec.rb
rturk-2.0.3 spec/xml_parse_spec.rb