Fix use of mocha gem
Merge pull request #1040 from danielstjules/issue-1039

Fix for issue-1039