Skip to content

Instantly share code, notes, and snippets.

@postazure
Last active August 29, 2015 14:17
Show Gist options
  • Save postazure/8a885c8135caee325aab to your computer and use it in GitHub Desktop.
Save postazure/8a885c8135caee325aab to your computer and use it in GitHub Desktop.
# spec/harvesters/yelp_harvester_spec.rb
require 'rails_helper'
require 'harvesters/harvester_index'
require 'harvesters/yelp_harvester'
describe HarvesterIndex do
it "gets rating" do
restaurant = Restaurant.create!({
name: "Test Name",
yelp_url: "http://www.yelp.com/biz/ovo-cafe-san-francisco"
})
HarvesterIndex.yelp
expect(restaurant.yelp_info.rating > 0).to be true
expect(restaurant.yelp_info.rating <= 5 ).to be true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment