Sha256: 2633141d8eeb1c8bccd47b0bfafd20b3e624bc09f8b060c416e0829018ada465
Contents?: true
Size: 675 Bytes
Versions: 15
Compression:
Stored size: 675 Bytes
Contents
# frozen_string_literal: true if defined?(RSpec) RSpec.shared_examples 'a valid backend for the questionnaires api' do let(:api) { Quby::Questionnaires::API.new(questionnaire_repo: repo) } it 'supports finding a questionnaire' do expect(api.find('simple').key).to eq('simple') end it 'supports checking whether a questionnaire exists' do expect(api.exists? 'simple').to be_truthy expect(api.exists? 'inexistant_questionnaire').to be_falsey end it 'supports finding all questionnaires' do expect(api.all.map(&:key)).to include('simple') expect(api.all.map(&:key)).to include('simple_with_outcome') end end end
Version data entries
15 entries across 15 versions & 1 rubygems