Sha256: 026176dc68da135fe8e8321f49dfb4c48ecaffd7b7b534f2d5bcea33a625d8bd
Contents?: true
Size: 859 Bytes
Versions: 4
Compression:
Stored size: 859 Bytes
Contents
require 'support/kitchen_helper' module ValidationHelper module SshCommandTests include KitchenHelper def test_barks_without_atleast_a_hostname cmd = command cmd.ui.expects(:err).with(regexp_matches(/hostname.*argument/)) $stdout.stubs(:puts) in_kitchen do assert_exits cmd end end end module KitchenCommandTests include KitchenHelper def test_barks_outside_of_the_kitchen cmd = default_command cmd.ui.expects(:err).with(regexp_matches(/must be run inside .* kitchen/)) outside_kitchen do assert_exits cmd end end # Returns a Knife instance that shoud run without other validation errors. def default_command command("somehost") end end module ValidationTests include SshCommandTests include KitchenCommandTests end end
Version data entries
4 entries across 4 versions & 1 rubygems