Browse files

Reorganize some vocabulary tests (no functional changes)

  • Loading branch information...
1 parent 996b485 commit 92457b1178b7412c90a8f2507071f2311da78b09 @bhuga bhuga committed Nov 13, 2010
Showing with 12 additions and 7 deletions.
  1. +12 −7 spec/vocabulary.spec
View
19 spec/vocabulary.spec
@@ -33,6 +33,7 @@ describe 'default vocabularies' do
}.should raise_error Spira::ResourceDeclarationError
end
+ # FIXME: reexamine this behavior. Static typing in the DSL? Why? Why not create a URI out of anything we can #to_s?
it "should raise a ResourceDelcarationError to set a predicate without a default vocabulary that is not an RDF::URI" do
lambda {
class VocabTestY
@@ -56,13 +57,6 @@ describe 'default vocabularies' do
property :name
property :title, :predicate => DC.title, :type => String
end
- class ::DefaultVocabVocab < ::RDF::Vocabulary('http://example.org/test#') ; end
- class ::HashVocabTest
- include Spira::Resource
- default_vocabulary DefaultVocabVocab
- base_uri "http://example.org/testing/"
- property :name
- end
end
before :each do
@@ -90,6 +84,17 @@ describe 'default vocabularies' do
end
context "that ends in a hash seperator" do
+ before :all do
+ class ::DefaultVocabVocab < ::RDF::Vocabulary('http://example.org/test#') ; end
+
+ class ::HashVocabTest
+ include Spira::Resource
+ default_vocabulary DefaultVocabVocab
+ base_uri "http://example.org/testing/"
+ property :name
+ end
+ end
+
before :each do
@name = RDF::URI("http://example.org/test#name")
end

0 comments on commit 92457b1

Please sign in to comment.