test/keyword_args_test.rb in invokr-0.0.4 vs test/keyword_args_test.rb in invokr-0.0.5

- old
+ new

@@ -27,9 +27,24 @@ def test_querying_optional_keyword_argument method = Invokr.query_method TestMethodBank.method :optional_keyword_argument assert_equal [:album], method.optional_dependencies end + + def test_passing_in_splat_raises_error + error = assert_raises Invokr::UnsupportedArgumentsError do + Invokr.invoke( + method: :keyword_splat_argument, + on: TestMethodBank, + with: { guitarist: 'trey' }, + ) + end + + assert_equal( + "unsupported splat argument(s) `rest' when invoking method `keyword_splat_argument' on #<TestMethodBank:0xdeadbeef>", + error.message, + ) + end end class RequiredKeywordArgsTest < Minitest::Test def setup skip unless RUBY_VERSION >= '2.1'