| |   |
| 516 | 516 | Object.send!(:remove_const,'SomeMeta') if defined?(SomeMeta) |
| 517 | 517 | SomeMeta = Meta.new |
| 518 | 518 | @document = SomeMeta.create! |
| 519 | @document = @document.reload |
| 519 | 520 | @document.should be_head |
| 520 | 521 | end |
| 521 | 522 | |
| 522 | 523 | it "should link to head meta" do |
| 523 | 524 | Object.send!(:remove_const,'SomeMeta') if defined?(SomeMeta) |
| 524 | 525 | SomeMeta = Meta.new(:some_slot => 1) |
| 525 | | pending("#42 bug to be actually fixed [NEEDS ATTENTION!!!]") do |
| 526 | | @document.meta.should be_head |
| 527 | | @document.meta.should_not be_a_kind_of(VersionedDocument) |
| 528 | | @document.meta.some_slot.should == 1 |
| 529 | | end |
| 526 | SomeMeta.document # ensure new metadoc version is saved |
| 527 | @document.meta.should be_head |
| 528 | @document.meta.should_not be_a_kind_of(VersionedDocument) |
| 529 | @document.meta.some_slot.should == 1 |
| 530 | 530 | end |
| 531 | 531 | |
| 532 | 532 | end |
| toggle raw diff |
--- a/spec/lib/strokedb/document/document_spec.rb
+++ b/spec/lib/strokedb/document/document_spec.rb
@@ -516,17 +516,17 @@ describe "Head Document with meta" do
Object.send!(:remove_const,'SomeMeta') if defined?(SomeMeta)
SomeMeta = Meta.new
@document = SomeMeta.create!
+ @document = @document.reload
@document.should be_head
end
it "should link to head meta" do
Object.send!(:remove_const,'SomeMeta') if defined?(SomeMeta)
SomeMeta = Meta.new(:some_slot => 1)
- pending("#42 bug to be actually fixed [NEEDS ATTENTION!!!]") do
- @document.meta.should be_head
- @document.meta.should_not be_a_kind_of(VersionedDocument)
- @document.meta.some_slot.should == 1
- end
+ SomeMeta.document # ensure new metadoc version is saved
+ @document.meta.should be_head
+ @document.meta.should_not be_a_kind_of(VersionedDocument)
+ @document.meta.some_slot.should == 1
end
end |