Sha256: bfa414c123b2a74cc7de044bab94bff66e1764206ae0e93c2ba34247a46948bc

Contents?: true

Size: 622 Bytes

Versions: 2

Compression:

Stored size: 622 Bytes

Contents

require File.expand_path("../../spec_helper", __FILE__)

module Playgroundbook
  describe PageLinter do
    include FakeFS::SpecHelpers
    let(:page_linter) { PageLinter.new(page_manifest_linter) }
    let(:page_manifest_linter) { double(PageManifestLinter) }

    it "fails if Contents.swift does not exist" do
      expect { page_linter.lint }.to raise_error(SystemExit)
    end

    it "passes through to page_manifest_linter" do
      File.open(ContentsSwiftFileName, "w") { |f| f.write("") }
      expect(page_manifest_linter).to receive(:lint)
      expect { page_linter.lint }.to_not raise_error
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
playgroundbook-0.6.0 spec/linter/page_linter_spec.rb
playgroundbook-0.4.0 spec/linter/page_linter_spec.rb