Created
July 30, 2009 20:36
-
-
Save febuiles/158920 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.join(File.dirname(__FILE__), 'spec_helper') | |
describe PhrasesMatcher do | |
before(:each) do | |
@matcher = PhrasesMatcher.new | |
@result1 = Recoup.new("hey guys what is the menu today?").start | |
@result2 = Recoup.new("what do you have today in the menu?").start | |
end | |
#given a parsed text, it should find the phrase's answer that matches the text. | |
# it given? Esa descripción no tiene sentido | |
it "given a valid phrase it should find an answer" do | |
answer1 = @matcher.find_answer_for(@result1) #te cagaste en la abstracción, es Recoup el que corre el parseo y no el matcher :) | |
answer2 = @matcher.find_answer_for(@result2) | |
answer1.should_not be_nil # probar que algo no sea nil no significa que esté bien, no seas perezoso | |
answer2.should_not be_nil | |
answer1.should == answer2 # este test está bueno. | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment