Sha256: 644428dd079cce0d6a2cbebb5949b6f3e786615d90ec38a7f73f6935c93632c2
Contents?: true
Size: 507 Bytes
Versions: 10
Compression:
Stored size: 507 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'active_record' describe "SAXMachine ActiveRecord integration" do before do class MySaxModel < ActiveRecord::Base SAXMachine.configure(MySaxModel) do |c| c.element :title end end end after do Object.send(:remove_const, :MySaxModel) end it "parses document" do document = MySaxModel.parse("<xml><title>My Title</title></xml>") expect(document.title).to eq("My Title") end end
Version data entries
10 entries across 10 versions & 1 rubygems