features/step_definitions/calais_steps.rb in jakal-0.0.8 vs features/step_definitions/calais_steps.rb in jakal-0.0.9
- old
+ new
@@ -40,5 +40,13 @@
Then /^I should be able to see the whole lot of tags as one block$/ do
tags = Jkl::get_tag_from_json(@response)
tags.length.should > 0
end
+When /^I request the nested entities from calais$/ do
+ key = YAML::load_file('config/keys.yml')['calais']
+ @response = Jkl::get_calais_metadata key, @text
+end
+
+Then /^I should get a decent response$/ do
+ @response.eql?({"Person"=>["Barack Obama", "Hillary Clinton"], "Position"=>["Secretary of State"]}).should == true
+end