-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
&& Brittany Jones Ampers #26
base: master
Are you sure you want to change the base?
Conversation
API MuncherWhat We're Looking For
|
gem 'foundation-rails', '6.4.1.2' | ||
group :development do | ||
gem 'better_errors' | ||
gem 'pry-rails' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gem should also be under :test
|
||
url = URL + "r=#{uri}&app_id=#{app_id}&app_key=#{app_key}" | ||
result = HTTParty.get(url) | ||
if result && result[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be something like:
if result && result[0] && result.code == 200
When the request fails, you're crashing
<%= stylesheet_link_tag "application" %> | ||
<%= csrf_meta_tags %> | ||
</head> | ||
<h1><%= link_to "Snack Time", root_path, alt: "link to home page" %></h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've put this code outside the body
element.
|
||
describe RecipesController do | ||
describe "index" do | ||
it "can return list of matching recipes" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No testing of searches
end | ||
end | ||
|
||
describe "self.find_recipe" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No attempt to find recipes with bad URIs
end | ||
|
||
it "will send bad_request if message sent to fake recipe page" do | ||
VCR.use_cassette("create_action_bad") do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails due to a bug in your wrapper, see my note there.
API Muncher
Congratulations! You're submitting your assignment!
Comprehension Questions