Sha256: 9f94c46e618f4246c24949270263e1c12b35be7e9835742beb4cbc4abee356a9
Contents?: true
Size: 1.2 KB
Versions: 16
Compression:
Stored size: 1.2 KB
Contents
# encoding: utf-8 require 'spec_helper' module Adhearsion class CallController module MenuDSL describe FixnumMatchCalculator do let(:match_payload) { :main } it "a potential match scenario" do calculator = FixnumMatchCalculator.new(444, match_payload) match = calculator.match '4' match.should be_potential_match match.should_not be_exact_match match.potential_matches.should be == [444] end it "a multi-digit exact match scenario" do calculator = FixnumMatchCalculator.new(5555, match_payload) match = calculator.match '5555' match.should be_exact_match end it "a single-digit exact match scenario" do calculator = FixnumMatchCalculator.new(1, match_payload) match = calculator.match '1' match.should be_exact_match end it "the context name given to the calculator should be passed on the CalculatedMatch" do match_payload = :icanhascheezburger calculator = FixnumMatchCalculator.new(1337, match_payload) calculator.match('1337').match_payload.should be match_payload end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems