spec/lib/history_spec.rb in active_metadata-0.7.9 vs spec/lib/history_spec.rb in active_metadata-0.8.0

- old
+ new

@@ -17,11 +17,11 @@ it "should create history for a defined field when a document is created" do @document.history_for(:name)[0].value.should eq(@document.name) end it "should verify that histories are created for the correct model" do - @document.history_for(:name)[0].document_class.should eq(@document.class.to_s) + @document.history_for(:name)[0].model_class.should eq(@document.class.to_s) end it "should save the craeted_at datetime anytime an history entry is created" do @document.history_for(:name)[0].created_at.should be_a_kind_of Time end @@ -44,13 +44,13 @@ @section = @document.create_section :title => "new section" @section.reload # expectations @document.history_for(:name).count.should eq(1) - @document.history_for(:name).last.document_id.should eq @document.id + @document.history_for(:name).last.model_id.should eq @document.id @section.history_for(:title).count.should eq(1) - @section.history_for(:title).last.document_id.should eq @document.id + @section.history_for(:title).last.model_id.should eq @document.id end it "should verify that history_for sort by created_at descending" do #fixtures 3.times do |i| \ No newline at end of file