Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b876a8fef8
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (39 sloc) 2.838 kb
require "spec_helper"
describe Zonebie::Extras::AsciiMap do
describe "#to_s" do
it "prints a map of the world" do
map = File.open(File.expand_path('../../../fixtures/ascii_map.png', File.dirname(__FILE__)))
Zonebie::Extras::AsciiMap.any_instance.expects(:open).yields(map)
Zonebie::Extras::AsciiMap.new('International Date Line West').to_s.should ==
%{
..... ......
..... ........... .
. . .. ........... . .
. .. .. ........... . ..
.. .. . ........ . .......
..... .... . ... ....... .. . . ...................
............ ........ ... ... .. ..... ...............................
... ......... . .. ..... ............................ .
........... \e[31m.\e[0m.. . .. ..................... ......
............ ........ .. ...................
........... .. . ..... ............... .
... . .............. ................
... ............. .. .. ... .
..... .. .......... . .
.......... ...... .
....... ..... . .....
..... ... .........
.... ..
..
.
.
.. .......... ...................
. .... .... ..........................................
............... . ............................................
.................. . .............................................
..................... .............................................
.........................................................................
...........................................................................}
end
end
end
Jump to Line
Something went wrong with that request. Please try again.