Sha256: 7f8cba039a5db6e792a54b621a9dc43e1a97b76f7e565014532f05e0cd7f8458
Contents?: true
Size: 773 Bytes
Versions: 1
Compression:
Stored size: 773 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + "/spec_helper.rb") module Vircs describe Virc do context "#current" do it "returns the currently set vim config if set and args are set" do File.should_receive(:read).and_return("foo") subject.current("some args").should eq("foo") end it "displays the currently set vim config if set and args are nil" do File.should_receive(:read).and_return("foo") capture(:stdout) { subject.current(nil) }.should eq("foo\n") end it "throws an exception if the current vim config is not set" do File.should_receive(:read).and_raise("FROM DOWN TOWN") expect { subject.current("some args") }.to raise_error("FROM DOWN TOWN") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vircs-1.0.2 | spec/current_spec.rb |