Sha256: 995661a3bf0d793a9f770ec539d2bc0fdd22ab2f74e3b95ada44a8ce058f922d

Contents?: true

Size: 916 Bytes

Versions: 3

Compression:

Stored size: 916 Bytes

Contents

require './lib/commands/new_command'
require 'fakefs/spec_helpers'

RSpec.describe NewCommand do
  describe '#execute' do
    include FakeFS::SpecHelpers

    let(:command) { NewCommand.new('testdir') }

    before { command.execute }

    it 'creates folder for drafts' do
      expect(File.directory?('testdir/_drafts')).to be_truthy
    end

    it 'creates folder for posts' do
      expect(File.directory?('testdir/_posts')).to be_truthy
    end

    it 'creates folder for pages' do
      expect(File.directory?('testdir/_pages')).to be_truthy
    end

    it 'creates folder for includes' do
      expect(File.directory?('testdir/_includes')).to be_truthy
    end

    it 'creates folder for layout templates' do
      expect(File.directory?('testdir/_layouts')).to be_truthy
    end

    it 'creates folder for generated site' do
      expect(File.directory?('testdir/_site')).to be_truthy
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ignoramos-1.1.0 spec/commands/new_command_spec.rb
ignoramos-1.0.1 spec/commands/new_command_spec.rb
ignoramos-1.0.0 spec/commands/new_command_spec.rb