Sha256: 585462c985c93bc56c7ae6ca01ef870721fa56da73ca6f8f1cae5f7fc811bda6
Contents?: true
Size: 669 Bytes
Versions: 81
Compression:
Stored size: 669 Bytes
Contents
require "spec_helper" describe "Hashing" do let(:doc) { Brief.concept_document } it "has a content hash" do expect(doc.content_hash).not_to be_empty end it "has a file system hash" do expect(doc.file_hash).not_to be_empty end it "detects when it is stale" do new_content = doc.content += "\n\n1"; doc.path.open("w+") {|fh| fh.write("---\ntype: concept\n\n---\n\n#{new_content}") } expect(doc).to be_content_stale end it "refreshes itself if stale" do new_content = doc.content += "\n\n1"; doc.path.open("w+") {|fh| fh.write("---\ntype: concept\n\n---\n\n#{new_content}") } expect(doc).to be_content_stale end end
Version data entries
81 entries across 81 versions & 1 rubygems