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