Sha256: b626a761fcaa5f9ad5dc9a642c410e8b12c0325afede027bde7a0920f923cab9
Contents?: true
Size: 1.24 KB
Versions: 16
Compression:
Stored size: 1.24 KB
Contents
# encoding: utf-8 require 'spec_helper' module Adhearsion class CallController module MenuDSL describe StringMatchCalculator do let(:match_payload) { :doesnt_matter } it "numerical digits mixed with special digits" do %w[5*11#3 5*** ###].each do |str| calculator = StringMatchCalculator.new str, match_payload match_case = calculator.match str[0,2] match_case.should_not be_exact_match match_case.should be_potential_match match_case.potential_matches.should be == [str] match_case = calculator.match str match_case.should be_exact_match match_case.should_not be_potential_match match_case.exact_matches.should be == [str] end end it "matching the special DTMF characters such as * and #" do %w[* #].each do |special_digit| calculator = StringMatchCalculator.new(special_digit, match_payload) match_case = calculator.match special_digit match_case.exact_matches.first.should be == special_digit match_case.should be_exact_match match_case.should_not be_potential_match end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems