rspec tests
This commit is contained in:
@@ -66,7 +66,7 @@ def get_equal_string_end(stringarray = [""])
|
||||
break
|
||||
end
|
||||
end
|
||||
if looping == false or (counter * -1 ) >= base.length
|
||||
if looping == false or (counter * -1 ) > base.length
|
||||
break
|
||||
end
|
||||
already_found = "#{character if character}#{already_found}"
|
||||
|
||||
@@ -79,8 +79,14 @@ module WpUsernames
|
||||
end
|
||||
|
||||
def remove_junk_from_nickname(usernames)
|
||||
unless usernames.kind_of? Array
|
||||
raise("Need an array as input")
|
||||
end
|
||||
nicknames = []
|
||||
usernames.each do |u|
|
||||
unless u.kind_of? WpUser
|
||||
raise("Items must be of type WpUser")
|
||||
end
|
||||
nickname = u.nickname
|
||||
unless nickname == "empty"
|
||||
nicknames << nickname
|
||||
|
||||
Reference in New Issue
Block a user