Sha256: 6a68a6d99dfc0732df17dc081ad91a0a4c98e35b6140eda6a7ef52e7c5b0590b

Contents?: true

Size: 490 Bytes

Versions: 5

Compression:

Stored size: 490 Bytes

Contents

require "spec_helper"
require "rails-footnotes/notes/view_note"

describe Footnotes::Notes::ViewNote do
  it "should not be valid if view file not exist" do
    note = Footnotes::Notes::ViewNote.new(double)
    allow(note).to receive(:filename).and_return(nil)

    expect(note).not_to be_valid
  end

  it "should not explode if template is nil" do
    Footnotes::Notes::ViewNote.template = nil

    note = Footnotes::Notes::ViewNote.new(double)
    expect(note).to_not be_valid
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
rails-footnotes-7.1.0 spec/notes/view_note_spec.rb
rails-footnotes-7.0.1 spec/notes/view_note_spec.rb
rails-footnotes-7.0.0 spec/notes/view_note_spec.rb
rails-footnotes-5.0.0 spec/notes/view_note_spec.rb
rails6-footnotes-5.0.2 spec/notes/view_note_spec.rb