Sha256: 9c89bd7cb90b9b5ccafda4c2ffe434e0cbfc27be24d48131b1b079360a97c778
Contents?: true
Size: 647 Bytes
Versions: 4
Compression:
Stored size: 647 Bytes
Contents
require 'spec_helper' describe ActiveFedora::NomDatastream do describe "test" do subject { class MyNomDatastream < ActiveFedora::NomDatastream set_terminology do |t| t.a :path => '//a', :accessor => lambda { |x| x.text }, :index => 'a_s' t.b :path => '//b', :index => 'b_s' end end MyNomDatastream.from_xml '<root><a>123</a><b><c>asdf</c></b></root>' } it "should work" do subject.a.should include("123") end it "should to_solr" do subject.to_solr['a_s'].should include('123') subject.to_solr['b_s'].should include('asdf') end end end
Version data entries
4 entries across 4 versions & 1 rubygems