Sha256: 8e738ed24abc63b34e4a13f6918c66add1a5188bd4128f4c3ab28fe9377f0e2f

Contents?: true

Size: 1.07 KB

Versions: 5

Compression:

Stored size: 1.07 KB

Contents

# typed: false
# frozen_string_literal: true

require './spec/spec_setup'
require 'frontman/builder/file'

describe Frontman::Builder::File do
  subject { Frontman::Builder::File.new('fake/path', :created) }

  it 'should return the correct path' do
    expect(subject.path).to eq 'fake/path'
  end

  context 'updated' do
    subject { Frontman::Builder::File.updated('fake/path') }

    it 'should initialize with the right status' do
      expect(subject.status).to eq :updated
    end
  end

  context 'created' do
    subject { Frontman::Builder::File.created('fake/path') }

    it 'should initialize with the right status' do
      expect(subject.status).to eq :created
    end
  end

  context 'deleted' do
    subject { Frontman::Builder::File.deleted('fake/path') }

    it 'should initialize with the right status' do
      expect(subject.status).to eq :deleted
    end
  end

  context 'unchanged' do
    subject { Frontman::Builder::File.unchanged('fake/path') }

    it 'should initialize with the right status' do
      expect(subject.status).to eq :unchanged
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
frontman-ssg-0.1.1 spec/frontman/builder/file_spec.rb
frontman-ssg-0.1.0 spec/frontman/builder/file_spec.rb
frontman-ssg-0.0.4 spec/frontman/builder/file_spec.rb
frontman-ssg-0.0.3 spec/frontman/builder/file_spec.rb
frontman-ssg-0.0.2 spec/frontman/builder/file_spec.rb