File: test_device.rb

package info (click to toggle)
ruby-nfc 3.1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 160 kB
  • sloc: ansic: 304; ruby: 129; makefile: 5
file content (15 lines) | stat: -rw-r--r-- 352 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require "minitest/autorun"
require "nfc"

module NFC
  class TestDevice < Minitest::Test
    def test_initiator_init
      ctx = NFC::Context.new
      devs = ctx.devices(1)
      skip "no devs attached" unless devs.length > 0
      dev = ctx.open nil
      dev.initiator_init
      dev.select_passive_target Device::IM_ISO14443A_106
    end
  end
end