-
-
Save dstarh/d2a196841a04ac9697c3 to your computer and use it in GitHub Desktop.
This file contains 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
sentence_breakdown = TestData.one_food_with_unit_and_slot | |
nlp_wrapper_mock = mock('nlp_wrapper') | |
raw_text = "I ate some beef stew" | |
NlpWrapper.stubs(:new).returns(stanford_nlp_wrapper_mock) | |
nlp_wrapper_mock.expects(:parse).with(raw_text).returns(sentence_breakdown) | |
assert_difference "NlpSentencesBreakdownAuditLog.count", 1 do | |
post :create, format: :json, api_version: 1, | |
raw_text: "I ate some beef stew" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment