Sha256: 91b3990ef9b877a524fb4a833cc2eddd56601ca14f7789eb4df503222938d603
Contents?: true
Size: 1.18 KB
Versions: 4
Compression:
Stored size: 1.18 KB
Contents
require 'tempfile' require 'spec_helper' describe "redpomo init" do let(:config_path) { tmp_path('redpomo') } it "generates a .redpomo config file" do redpomo "init #{config_path}", env: { "EDITOR" => "echo editor" } File.exists?(config_path).should be_true end it "opens the config with REDPOMO_EDITOR as highest priority" do redpomo "init #{config_path}", :env => {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "REDPOMO_EDITOR" => "echo redpomo_editor"} out.should == "redpomo_editor #{config_path}" end it "opens the config with VISUAL as 2nd highest priority" do redpomo "init #{config_path}", :env => {"EDITOR" => "echo editor", "VISUAL" => "echo visual", "REDPOMO_EDITOR" => ""} out.should == "visual #{config_path}" end it "opens the config with EDITOR as 3rd highest priority" do redpomo "init #{config_path}", :env => {"EDITOR" => "echo editor", "VISUAL" => "", "REDPOMO_EDITOR" => ""} out.should == "editor #{config_path}" end it "complains if no EDITOR is set" do redpomo "init #{config_path}", :env => {"EDITOR" => "", "VISUAL" => "", "REDPOMO_EDITOR" => ""} out.should include "set $EDITOR or $REDPOMO_EDITOR" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
redpomo-0.0.13 | spec/integration/init_spec.rb |
redpomo-0.0.12 | spec/integration/init_spec.rb |
redpomo-0.0.11 | spec/integration/init_spec.rb |
redpomo-0.0.10 | spec/integration/init_spec.rb |