Skip to content

Conversation

@meltar
Copy link

@meltar meltar commented Jun 9, 2013

No description provided.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one final recommendation (this is a new one of mine) --- if you have an attr_reader for ammunition_reserves, it works well to only refer to it by the ammunition_reserves method.

  if amount <= ammunition_reserves

Why? Because later you can move ammunition_reserves from an instance variable to another object... And you could

def ammunition_reserves
  Reserves.calculate_ammunition(self)
end

and the request_ammunition method wouldn't know the difference.

@jwo
Copy link
Member

jwo commented Jun 10, 2013

Most excellent job! Great job on the course. For this episode --- which did you like better? MiniTest or RSpec?

@meltar
Copy link
Author

meltar commented Jun 10, 2013

RSpec syntax makes more sense to me. It was interesting to work with both, but hard to switch back and forth in the same project.

I need to try working with the new RSpec expect syntax. I think I'd like it more then the should syntax.

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