We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a62e09 commit 7b2e6e1Copy full SHA for 7b2e6e1
1 file changed
lib/rdf/spec/matchers.rb
@@ -141,10 +141,16 @@ module Matchers
141
end
142
143
144
- RSpec::Matchers.define :have_subclasses do |base_uri, klasses|
+ RSpec::Matchers.define :have_terms do |base_uri, klasses|
145
match do |vocabulary|
146
klasses.map { |k| k.to_sym }.each do |klass|
147
- pending "checks that #{base_uri} has subClassOf for #{klass}"
+ expect(vocabulary[klass]).to be_a_uri
148
+ expect(vocabulary[klass].to_s).to eq "#{base_uri}#{klass}"
149
+ expect(vocabulary).to respond_to(klass)
150
+ expect { vocabulary.send(klass) }.not_to raise_error
151
+ expect(vocabulary.send(klass)).to be_a_uri
152
+ expect(vocabulary.send(klass.to_s)).to be_a_uri
153
+ expect(vocabulary.send(klass).to_s).to eq "#{base_uri}#{klass}"
154
155
true
156
0 commit comments