railsgirlslondon/railsgirls-london — pull request #106 by olivernn (2013-06-05 22:11:37+00:00)
Title: Refactor registrations controller

Just a couple of things I saw whilst looking through the code.

* Go through the registration association of the event to init registrations
* Move logic that determines whether registrations are being accepted to the event model

The `accepting_registrations?` method has the same logic as was in the controller before (though please double check!). This logic says that if today is the registration deadline, then **do not** accept new registrations, is this correct?

I'm not sure what I think about the whole Given/When/Then stuff in rspec, at any rate I don't really understand how to use it, so I just used plain vanilla rspec for the tests. I'm happy for someone to educate me on the new fangled Given/When/Then stuff though.