Sha256: 620a2f4b09b60cbf1b5d42c771bea316ce70ee2a39665cfac4fbbcac2b13538e

Contents?: true

Size: 549 Bytes

Versions: 1

Compression:

Stored size: 549 Bytes

Contents

require 'test_helper'
require_relative '../../../lib/nesta/commands'

describe 'nesta edit' do
  include TestConfiguration

  after do
    remove_temp_directory
  end

  it 'launches the editor' do
    ENV['EDITOR'] = 'touch'
    edited_file = 'path/to/page.md'
    with_temp_content_directory do
      FileUtils.mkdir_p(Nesta::Config.page_path(File.dirname(edited_file)))
      command = Nesta::Commands::Edit.new(edited_file)
      command.execute
      assert File.exist?(Nesta::Config.page_path(edited_file)), 'editor not run'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nesta-0.12.0 test/integration/commands/edit_test.rb