test/integration/command_test.rb in cogy-0.1.0 vs test/integration/command_test.rb in cogy-0.1.1

- old
+ new

@@ -41,7 +41,17 @@ def test_rails_url_helpers get "/cogy/cmd/rails_url_helpers/george" assert_equal "http://dummy.com/baz /baz", response.body end + + def test_invalid_opts_declaration + exception = assert_raises(ArgumentError) do + Cogy.on "invalidopts", desc: "foo", opts: { foo: {} } do + 1 + end + end + + assert_match(/\[:type, :required\]/, exception.message) + end end end