Skip to content
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

Submitting work #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Submitting work #19

wants to merge 3 commits into from

Conversation

mikeadeleke
Copy link

2 Questions

  1. Confuses what to enter into zoo.rb for Foodbarge
  2. I believe you already did the Eagle assignment for us

@jwo
Copy link
Member

jwo commented Dec 10, 2013

If you run your tests, you get:

/Users/jwo/Projects/scratchpad/Episode1/zoo.rb:88:in `include': wrong argument type Class (expected Module)

So, you can't include Food, which is a class. If you want to have access to food, you can access it later

Second,

panda.should_receive(:eat).with(:foodbarge)

Panda's aren't going to eat a foodbarge... But the foodbarge is going to give the panda a food that it should eat.

maybe you can test that the panda is full after visiting the foodbarge?

@mikeadeleke
Copy link
Author

I know I'm close now. Is it a good idea to add a visit method? I think I can simplify this

@jwo
Copy link
Member

jwo commented Dec 11, 2013

Tell me more about the visit method, I'm not sure I see your vision?

Also -- don't use "stub" in your regular code. It might work locally, but in production, rspec wouldn't be loaded and would cause a load error. (specifically, MethodMissing)

@mikeadeleke
Copy link
Author

So my visit method would show the panda visiting the foodbarge. After which, the panda becomes full.

@jwo
Copy link
Member

jwo commented Dec 12, 2013

Hmm, ok, so let's say in your Zoo you knew about all of the animals in it. If you had a feed_all! method on the zoo, it could iterate over the animals and for each of them, feed them food from the barge. yay? nay?

@mikeadeleke
Copy link
Author

Yeah that sounds good. I think I know where you're going with this but not yet connecting the dots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants