Sha256: 095404badc17ee3e09f321a27fe06ad645c1fe59768963bbdb1cdb1194e7e397
Contents?: true
Size: 1.67 KB
Versions: 15
Compression:
Stored size: 1.67 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') ASCII_QR = <<EOF ................................... .#######.##.....##.#.##....#######. .#.....#.......##.#.##.....#.....#. .#.###.#.#..#####..#.#..##.#.###.#. .#.###.#.##.#....#.####.##.#.###.#. .#.###.#.####.#....#.####..#.###.#. .#.....#..#..#.#..#####....#.....#. .#######.#.#.#.#.#.#.#.#.#.#######. ..........#.#.##.....##.##......... .####..#.#....##.#.##....##..###.#. ..#.##...##.....##.#.##.#.###...##. .#.###.##......##.#.##..##.#.###.#. ....###.#...#####..#.#...##.#...#.. .##.##.#..#.#....#.####..##.##..... ...#..#.##.##.#....#.###.##....##.. .#.######.##.#.#..#####..#######... .#.####..###.##.#.##....#...##.#... ...##.##..###.....##.#.##.########. .....#..###..##.....##.#########.#. .####.#####.##.....##.#...#...#.#.. ..##.#..#..#.#..#####..#.#..##...#. ...######.#####.#....#.##......#... ..###.....#..####.#....###.#...###. .###..####.####..#.#..#######...##. .#.#.##.##.#.....##.#.##.######.#.. ..#.#######..#.##.....##.#####...#. .........#.###.#.##.....##...#.#... .#######....#.#.##.....###.#.#..... .#.....#..###..#.#..######...###.#. .#.###.#.....#.####.#...########... .#.###.#.###...#.####.#.#.#........ .#.###.#.###..#####..#.##..#..#.... .#.....#.####.##.....##.###......#. .#######.#.#..##.#.##...#.##...#... ................................... EOF describe "ZPNG png2ascii" do it "should have QR examples" do Dir[File.join(SAMPLES_DIR,'qr_*.png')].should_not be_empty end Dir[File.join(SAMPLES_DIR,'qr_*.png')].each do |fname| describe fname do it "generates a nice ascii img" do ZPNG::Image.load(fname).to_ascii('#.').strip.should == ASCII_QR.strip end end end end
Version data entries
15 entries across 15 versions & 1 rubygems