File: test_command_runner.rb

package info (click to toggle)
ruby-cri 2.15.12-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 384 kB
  • sloc: ruby: 2,776; makefile: 11
file content (33 lines) | stat: -rw-r--r-- 789 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

require 'helper'

module Cri
  class CommandRunnerTestCase < Cri::TestCase
    def setup
      super

      @options   = { vehicle: 'pig' }
      @arguments = %w[baby_monkey]
      @command   = Cri::Command.new
    end

    def test_initialize
      runner = Cri::CommandRunner.new(@options, @arguments, @command)

      assert_equal @options,   runner.options
      assert_equal @arguments, runner.arguments
      assert_equal @command,   runner.command
    end

    def test_call_run
      assert_raises(Cri::NotImplementedError) do
        Cri::CommandRunner.new(@options, @arguments, @command).call
      end

      assert_raises(Cri::NotImplementedError) do
        Cri::CommandRunner.new(@options, @arguments, @command).run
      end
    end
  end
end