Sha256: d56e798c9cdad8faf6737ce9587a471124554b23b9ebe8c7e3dc8c69d265cd26
Contents?: true
Size: 510 Bytes
Versions: 6
Compression:
Stored size: 510 Bytes
Contents
require 'spec_helper' describe Sheet::Write do let (:editor) { 'vim' } it 'opens a new file for writing' do cmd = "#{editor} #{Sheet.sheet_path('tmux')}" Sheet.should_receive(:exec).with(cmd, true) Sheet.stub(:editor) { editor } Sheet::Write.new('tmux').write end it 'returns an error if no editor is found' do Sheet.stub(:editor) { nil } Sheet.should_receive(:write).with { "Please set the $EDITOR variable to write files" } Sheet::Write.new('tmux').write end end
Version data entries
6 entries across 6 versions & 1 rubygems