diff --git a/spec/semver_spec.lua b/spec/semver_spec.lua index e649323..966540d 100644 --- a/spec/semver_spec.lua +++ b/spec/semver_spec.lua @@ -39,7 +39,7 @@ context('semver', function() end) end) - describe('errors are thrown in', function() + describe('errors', function() test('no parameters are passed', function() assert_error(function() v() end) end) @@ -62,6 +62,9 @@ context('semver', function() test('garbage at the end of the string', function() assert_error(function() v("1.2.3foobar") end) end) + test('a non-string or number is passed', function() + assert_error(function() v({}) end) + end) end) end)