Sha256: b8d9592cfdda4d63e89a17abb31f422d68f8bc7e7845f21ae8fcb97a37e90da2
Contents?: true
Size: 775 Bytes
Versions: 11
Compression:
Stored size: 775 Bytes
Contents
# Copyright (c) 2008-2013 Michael Dvorkin and contributors. # # Fat Free CRM is freely distributable under the terms of MIT license. # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ require "fat_free_crm/core_ext/string" describe "String" do it "should generate all possible combinations of first and last name from a query" do expected = [ ["Stephanie", "Man Chi Lo"], ["Stephanie Man", "Chi Lo"], ["Stephanie Man Chi", "Lo"], ["Lo", "Stephanie Man Chi"], ["Chi Lo", "Stephanie Man"], ["Man Chi Lo", "Stephanie"] ] result = "Stephanie Man Chi Lo".name_permutations result.sort.should == expected.sort end end
Version data entries
11 entries across 11 versions & 1 rubygems