require('assert');
var Filter = require('../lib/badwords.js'),
	filter = new Filter(),
	assert = require('better-assert');

describe('filter', function(){
	describe('isProfane',function(){
		it("Should detect a bad word and return a boolean value",function(){
			assert(filter.isProfane("ash0le"));
		});

		it("Should return false when no bad word is detected",function(){
			assert(filter.isProfane("wife") === false);
		});

		it("Should be able to detect a bad word in a sentence",function(){
			assert(filter.isProfane("that person is an ash0le"));
		});

		it('Filters out special characters appropriately', function() {
			assert(filter.isProfane("You're an asshole^ you are"));
		});

		it('Should detect filtered words from badwords-list', function(){
			assert(filter.isProfane('willies'));
		});

		it('Should detect words not in the list but are similar using soundex', function() {
			assert(filter.isProfane('biotch'));
			assert(filter.isProfane('asswhole'));
		});
	});
});

@@ -803,182 +803,8 @@
 %09%7D);
-%0A%0A%09%09it('Should detect words not in the list but are similar using soundex', function() %7B%0A%09%09%09assert(filter.isProfane('biotch'));%0A%09%09%09assert(filter.isProfane('asswhole'));%0A%09%09%7D);
 %0A%09%7D)

update isProfane test