Sha256: b690aa3ab9852cc4d624bf633bc65cdbfaeb0a5b7633890c03c0ad87e2164a98

Contents?: true

Size: 660 Bytes

Versions: 31

Compression:

Stored size: 660 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

module Vedeu

  module Input

    describe Raw do

      let(:described) { Vedeu::Input::Raw }
      let(:instance)  { described.new }

      describe '#initialize' do
        it { instance.must_be_instance_of(described) }
      end

      describe '.read' do
        let(:keypress) { 'a' }

        before do
          Vedeu::Terminal.console.stubs(:getch).returns(keypress)
        end

        subject { described.read }

        it { subject.must_equal(keypress) }
      end

      describe '#read' do
        it { instance.must_respond_to(:read) }
      end

    end # Raw

  end # Input

end # Vedeu

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
vedeu-0.8.32 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.31 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.30 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.29 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.28 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.27 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.26 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.25 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.24 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.23 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.22 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.21 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.20 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.19 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.18 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.17 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.16 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.15 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.14 test/lib/vedeu/input/raw_test.rb
vedeu-0.8.13 test/lib/vedeu/input/raw_test.rb