Sha256: 90fec58f99cc80a7b9d09167199aa6ab14d3f509364dfb1e942d646331429ca9
Contents?: true
Size: 811 Bytes
Versions: 10
Compression:
Stored size: 811 Bytes
Contents
# frozen_string_literal: true # 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 expect(result.sort).to eq(expected.sort) end end
Version data entries
10 entries across 10 versions & 1 rubygems