Sha256: 412bb91529985d62d47135cb6fcbcf78bd789aae327a685284816dbffe2895ed
Contents?: true
Size: 713 Bytes
Versions: 2
Compression:
Stored size: 713 Bytes
Contents
require 'spec_helper' describe RobotVim::ScriptFile do describe "when creating a script file from a string" do let(:commands_string){"some string of vim commands"} it "yields the path of the script file" do expected_path = "/some/path/somewhere" tempfile = stub("tempfile", :path => expected_path).as_null_object Tempfile.stub(:open).and_yield(tempfile) RobotVim::ScriptFile.open(commands_string) do |file_path| file_path.should == expected_path end end it "writes the commands out to the script file" do RobotVim::ScriptFile.open(commands_string) do |file_path| File.read(file_path).should == commands_string end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
robot-vim-0.1.1 | spec/robot-vim/script_file_spec.rb |
robot-vim-0.1.0 | spec/robot-vim/script_file_spec.rb |