Sha256: f840bdf19ff31ba1cfec2c480843d26cffae351e227711d699a1020ed8480477

Contents?: true

Size: 557 Bytes

Versions: 1

Compression:

Stored size: 557 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + "/spec_helper.rb")

module Vircs
  describe Virc do
    context "#prompt_info" do
      it "raises an error when .current file doesn't exist" do
        File.should_receive(:read).and_raise("File not found")
        expect { subject.prompt_info(nil) }.to raise_error("File not found")
      end
      it "displays the current configuration" do
        File.should_receive(:read).and_return("12345")
        capture(:stdout){ subject.prompt_info(:foo) }.should eq("virc:12345\n")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vircs-1.0.2 spec/prompt_info_spec.rb