Skip to content

Commit 5fc09df

Browse files
committed
Verify that vocabulary terms defined in snake_case are not automatically converted to camelCase.
For #385.
1 parent 14e7686 commit 5fc09df

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

spec/vocabulary_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@
260260
property :Class
261261
property :prop
262262
property :prop2, label: "Test property label", comment: " Test property comment"
263+
property :snake_case
263264
end
264265
end
265266

@@ -272,6 +273,11 @@
272273
.to eq (test_vocab.to_uri / 'aMissingMethod')
273274
end
274275

276+
it "does not camelize if snake-case term found" do
277+
expect(test_vocab.snake_case).to be_a(RDF::Vocabulary::Term)
278+
expect(test_vocab.snake_case).to eq (test_vocab.to_uri / 'snake_case')
279+
end
280+
275281
it "should respond to [] with properties that have been defined" do
276282
expect(test_vocab[:prop]).to be_a(RDF::URI)
277283
expect(test_vocab["prop2"]).to be_a(RDF::URI)

0 commit comments

Comments
 (0)