Sha256: 298bd508c78f177165f51420bbc9be97a849be90bdb30ad1a1f590d7f69f3f92
Contents?: true
Size: 817 Bytes
Versions: 2
Compression:
Stored size: 817 Bytes
Contents
require 'spec_helper' module ActiveCopy describe Base do let(:page) { BasicPage.new id: "about" } it "finds the page by its id" do expect(page).to be_present, "Page was not found" end it "finds the right folder to read source files from" do expect(page.collection_path).to eq("spec/fixtures/basic_pages/content") end it "reads the yaml front matter as a hash" do expect(page.title).to eq('About Us') end it "reads the article body" do expect(page.source).to match(/We are a very serious company/) end it "returns the correct partial path" do expect(page.to_partial_path).to eq("basic_pages/basic_page") end it "finds the basic_page that we just made" do expect(BasicPage.all.map(&:id)).to include(page.id) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_copy-1.0.0 | spec/active_copy/base_spec.rb |
active_copy-1.0.0.pre | spec/active_copy/base_spec.rb |