spec/ruco/application_spec.rb in ruco-0.0.56 vs spec/ruco/application_spec.rb in ruco-0.1.0

- old
+ new

@@ -13,15 +13,15 @@ `rm #{rucorc} 2>&1` `rm -f #{@file}` end def write(content) - File.open(@file,'w'){|f| f.write(content) } + File.open(@file,'wb'){|f| f.write(content) } end def read - File.read(@file) + File.binary_read(@file) end def editor_part(view) view.naive_split("\n")[1..-2].join("\n") end @@ -108,18 +108,18 @@ end it "asks before closing changed file -- escape == no" do app.key('a') app.key(:"Ctrl+w") - app.view.split("\n").last.should include("Loose changes") + app.view.split("\n").last.should include("Lose changes") app.key(:escape).should_not == :quit app.key("\n").should_not == :quit end it "asks before closing changed file -- enter == yes" do app.key('a') app.key(:"Ctrl+w") - app.view.split("\n").last.should include("Loose changes") + app.view.split("\n").last.should include("Lose changes") app.key(:enter).should == :quit end end describe 'session' do