Sha256: a9d76a62bdd55f7af51218a2ab35a7774f8e194f4ef2d7b4362842ac6e9f6f11

Contents?: true

Size: 810 Bytes

Versions: 8

Compression:

Stored size: 810 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require "nokogiri"
require "om"

describe "OM::XML::Container" do
  
  before(:all) do
    class XMLTest
      include OM::XML
    end
  end
  
  it "should automatically include the other modules" do
    XMLTest.included_modules.should include(OM::XML::Container)
    XMLTest.included_modules.should include(OM::XML::Accessors)
    XMLTest.included_modules.should include(OM::XML::Validation)
    XMLTest.included_modules.should include(OM::XML::Properties)
    XMLTest.included_modules.should include(OM::XML::PropertyValueOperators)
  end
  
  describe "#sanitize_pointer" do
    it "should convert any nested arrays into hashes" do
      XMLTest.sanitize_pointer( [[:person,1],:role] ).should == [{:person=>1},:role]
    end
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
om-1.0.2 spec/unit/xml_spec.rb
om-1.0.1 spec/unit/xml_spec.rb
om-1.0.0 spec/unit/xml_spec.rb
om-0.1.10 spec/unit/xml_spec.rb
om-0.1.9 spec/unit/xml_spec.rb
om-0.1.8 spec/unit/xml_spec.rb
om-0.1.7 spec/unit/xml_spec.rb
om-0.1.6 spec/unit/xml_spec.rb