spec/calais/response_spec.rb in calais-0.0.10 vs spec/calais/response_spec.rb in calais-0.0.11

- old
+ new

@@ -67,9 +67,18 @@ it "should not raise an error if no score is given by OpenCalais" do response = Calais::Response.new(SAMPLE_RESPONSE_WITH_NO_SCORE) response.categories.map {|c| c.score }.should == [nil] end + it 'should find social tags' do + @response.socialtags.map {|c| c.name }.sort.should == ["Appropriate technology", "Bicycles", "Business_Finance", "Cycling", "Motorized bicycle", "Recreation", "Sustainability", "Sustainable transport", "Technology_Internet"] + end + + it 'should have important scores associated with social tags' do + @response.socialtags.map {|c| c.importance.should be_a_kind_of(Integer) } + end + + it 'should find instances for each entity' do @response.entities.each {|e| e.instances.size.should > 0 } end \ No newline at end of file