Skip to content

Commit

Permalink
Use lamprey (rdf-ldp) instead of derby as the LDP server for integrat…
Browse files Browse the repository at this point in the history
…ion tests
  • Loading branch information
cjcolvar committed Nov 29, 2022
1 parent b51917a commit bf5c3fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ source 'https://rubygems.org'

gem 'activesupport'
gem 'byebug', platforms: [:mri]
gem 'derby', git: 'https://github.com/samvera-labs/derby.git', branch: 'upgrade-rdf'

if ENV['RAILS_VERSION']
if ENV['RAILS_VERSION'] == 'edge'
Expand Down
13 changes: 9 additions & 4 deletions spec/lib/integration/integration_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

require 'capybara_discoball'
require 'derby/server'
require 'lamprey'

describe 'Integration tests' do
before(:all) do
Expand All @@ -12,21 +12,26 @@
WebMock.enable!
end

let!(:derby_server) do
Capybara::Discoball::Runner.new(Derby::Server).boot
let!(:ldp_server) do
Capybara::Discoball::Runner.new(RDF::Lamprey).boot
end

let(:debug) { ENV.fetch('DEBUG', false) }

let(:client) do
Faraday.new(url: derby_server) do |faraday|
Faraday.new(url: ldp_server) do |faraday|
faraday.response :logger if debug
faraday.adapter Faraday.default_adapter
end
end

subject { Ldp::Client.new client }

before do
# Initialize LDP server
subject.put "/", ""
end

it 'creates resources' do
subject.put '/rdf_source', ''
obj = subject.find_or_initialize('/rdf_source')
Expand Down

0 comments on commit bf5c3fc

Please sign in to comment.