Sha256: 6203d483c841f7b21d2e89578813594af5760a90233bfd60c613406b59775154

Contents?: true

Size: 498 Bytes

Versions: 6

Compression:

Stored size: 498 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'] = 'vi'
    edited_file = 'path/to/page.md'
    process = Minitest::Mock.new
    process.expect(:run, true, [ENV['EDITOR'], /#{edited_file}$/])
    with_temp_content_directory do
      command = Nesta::Commands::Edit.new(edited_file)
      command.execute(process)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nesta-0.18.0 test/integration/commands/edit_test.rb
nesta-0.17.0 test/integration/commands/edit_test.rb
nesta-0.16.0 test/integration/commands/edit_test.rb
nesta-0.15.0 test/integration/commands/edit_test.rb
nesta-0.14.0 test/integration/commands/edit_test.rb
nesta-0.13.0 test/integration/commands/edit_test.rb