Sha256: d5199fce5422176dd2472a36bd0b1a1d1aa1f85b7d8cd3059ec7e0f98ee56631

Contents?: true

Size: 842 Bytes

Versions: 2

Compression:

Stored size: 842 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "helper"))

class EncoderTestCase < QRToolsTestCase
  def test_encode
    assert code = QRTools::Encoder.encode('hello world')
  end

  def test_encode_with_mode
    assert code = QRTools::QRCode.encode('元気',
      :mode => QRTools::Encoder::KANJI
    )
  end

  def test_encode_with_version
    assert code = QRTools::Encoder.encode('hello world',
      :version => 1
    )
  end

  def test_encode_with_case_sensitivity_off
    assert code = QRTools::Encoder.encode('hello world',
      :case_sensitive => false
    )
  end

  def test_encode_with_error_correction
    assert code = QRTools::Encoder.encode('hello world',
      :error_correction => QRTools::Encoder::L
    )
  end

  def test_code_has_a_width
    assert code = QRTools::Encoder.encode('hello world')
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
qrtools-1.0.0 test/test_encoder.rb
qrtools-1.0.1 test/test_encoder.rb