Sha256: e3582ac6b7bdcb7e78cd8bcf72dfbadc745d89db8a704966294e4a34222ab590

Contents?: true

Size: 840 Bytes

Versions: 20

Compression:

Stored size: 840 Bytes

Contents

describe "RdfContext library"
  it "should allow the programmer to Follow His Nose" do
    a = URIRef.new("http://127.0.0.1:3001/test")
    test_proc = lambda { |req, resp|
      resp['Content-Type'] = "application/rdf+xml"
      resp.body = <<-EOF;
<?xml version="1.0" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/">
 <rdf:Description rdf:about="http://localhost:3001/test">
   <foaf:name>Testy McTest</foaf:name>
 </rdf:Description>
</rdf:RDF>
EOF
      }
      test = HTTPServlet::ProcHandler.new(test_proc)
      s = HTTPServer.new(:Port => 3001)
      s.mount("/test", test)
      trap("INT"){ s.shutdown }
      thread = Thread.new { s.start }
      graph = a.load_graph
      s.shutdown
      graph.class.should == RdfContext::Graph
      graph.size.should == 1
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rdf_context-0.5.11 test/longtests_spec.rb
rdf_context-0.5.10 test/longtests_spec.rb
rdf_context-0.5.9.1 test/longtests_spec.rb
rdf_context-0.5.9 test/longtests_spec.rb
rdf_context-0.5.8.2 test/longtests_spec.rb
rdf_context-0.5.8.1 test/longtests_spec.rb
rdf_context-0.5.7 test/longtests_spec.rb
rdf_context-0.5.6 test/longtests_spec.rb
rdf_context-0.5.5 test/longtests_spec.rb
rdf_context-0.5.3 test/longtests_spec.rb
rdf_context-0.5.2 test/longtests_spec.rb
rdf_context-0.5.1 test/longtests_spec.rb
rdf_context-0.5.0 test/longtests_spec.rb
rdf_context-0.4.8 test/longtests_spec.rb
rdf_context-0.4.7 test/longtests_spec.rb
rdf_context-0.4.6 test/longtests_spec.rb
rdf_context-0.4.5 test/longtests_spec.rb
rdf_context-0.4.4 test/longtests_spec.rb
rdf_context-0.4.3 test/longtests_spec.rb
rdf_context-0.4.2 test/longtests_spec.rb