Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update sinatra spec based on changes to Sinatra/Rack::Test.

  • Loading branch information...
commit aeff8aa9efccac0581177047cfea86306bf601eb 1 parent 986e817
@gkellogg gkellogg authored
Showing with 13 additions and 8 deletions.
  1. +1 −1  README.md
  2. +12 −7 spec/sinatra_spec.rb
View
2  README.md
@@ -150,7 +150,7 @@ a full set of RDF formats.
require 'uri'
get '/' do
- settings.sparql_options.replace(:standard_prefixes => true)
+ settings.sparql_options.replace(:standard_prefixes => true)
repository = RDF::Repository.new do |graph|
graph << [RDF::Node.new, RDF::DC.title, "Hello, world!"]
end
View
19 spec/sinatra_spec.rb
@@ -1,15 +1,10 @@
$:.unshift "."
require 'spec_helper'
require 'sinatra/sparql'
-require 'rack/test'
require 'sinatra'
-describe Sinatra::SPARQL do
- include ::Rack::Test::Methods
-
- def app
- Sinatra::Application
- end
+class SPTest < Sinatra::Base
+ register Sinatra::SPARQL
get '/' do
body "A String"
@@ -38,6 +33,16 @@ def app
repo << [RDF::URI('a'), RDF::URI('b'), "d", RDF::URI('e')]
body service_description(:repository => repo, :endpoint => RDF::URI("/endpoint"))
end
+end
+
+require 'rack/test'
+
+describe Sinatra::SPARQL do
+ include ::Rack::Test::Methods
+
+ def app
+ SPTest.new
+ end
describe "self.registered" do
it "sets :sparql_options" do
Please sign in to comment.
Something went wrong with that request. Please try again.