Sha256: 565d58d566fa2d8b63d6e11acef15fa8e6b7c65d0ab369e1ea071d2954b6da13
Contents?: true
Size: 759 Bytes
Versions: 2
Compression:
Stored size: 759 Bytes
Contents
require File.dirname(__FILE__) + '/test_helper' class BadEncodingsTest < Test::Unit::TestCase context 'A file with bad encodings' do should 'fail' do path = File.dirname(__FILE__) bad_file = path + '/bad_encodings/bad1.rb' bad_lines = BadEncodings.find_lines_in_file(bad_file) assert_equal bad_lines, [[path+"/bad_encodings/bad1.rb", 4]] end end context 'A path with bad encodings' do should 'fail' do path = File.dirname(__FILE__) bad_lines = BadEncodings.find_lines_in_path(path) puts bad_lines.inspect assert_equal bad_lines, [[path+"/bad_encodings/bad1.rb", 4], [path+"/bad_encodings/bad2.rb", 1], [path+"/bad_encodings/bad2.rb", 3], [path+"/bad_encodings/bad3.rb", 1]] end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
adamsalter-bad_encodings-ruby19-0.1.2 | test/bad_encodings_test.rb |
bad_encodings-ruby19-0.1.2 | test/bad_encodings_test.rb |