Sha256: 5dcd3addf483fdfb18bbc0c6391ab023c86ca1d9af088e63f65fe42108c33cdb

Contents?: true

Size: 869 Bytes

Versions: 28

Compression:

Stored size: 869 Bytes

Contents

require "spec_helper"

describe "The Page Document Type" do
  let(:page) { Brief.page_document.model_class }
  let(:concept) { Brief::Concept }

  it "should have some example content" do
    expect(page.example_content).not_to be_empty
  end

  it "should return the example because there's no new_doc_template defined" do
    expect(page.new_doc_template).to eq page.example_content
  end

  it "should return whatever is defined in the new_doc_template dsl" do
    expect(concept.new_doc_template).to eq "The concept new doc template"
  end

  it "should return the default document name because there's no new_doc_name defined" do
    expect(page.new_doc_name).to eq "page-#{ DateTime.now.strftime("%Y-%m-%d") }.md"
  end

  it "should return the new document name if new_doc_name is defined" do
    expect(concept.new_doc_name).to eq "somecustomname.md"
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
brief-1.17.14 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.13 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.12 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.11 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.10 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.9 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.8 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.7 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.5 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.4 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.3 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.2 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.1 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.17.0 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.16.2 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.16.1 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.16.0 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.15.5 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.15.4 spec/lib/brief/models/new_doc_content_spec.rb
brief-1.15.3 spec/lib/brief/models/new_doc_content_spec.rb