mikamai/ruby-lol — pull request #29 by cameron-martin (2014-08-10 02:28:05+00:00)
Title: Refactored request specs.

I introduced a `stub_request` method to simplify the fixture loading and method expectations.
I also moved the message expectations out of the subject block and into a before filter,
since I believe expectations do not belong in a subject block.

The http GET verb is hard-coded into `stub_request`, but the API is currently does not, and is unlikely to ever use
any other http verb.

I changed the name of the `getbyid-team` fixture to `get-team-by-id`, to be consistent with `get-summoner-by-name` and `get-champion-by-id`, etc.
This also makes the above simplifications possible.

I also moved the spec helper methods previously defined in `spec_helper` into a module in `support/helpers`.
The makes the `spec_helper` file cleaner/clearer. The two files named `helpers` and `model_helpers` may be confusing,
if you can think of any better names I'll change them.

There are a few other, mainly cosmetic/structural, changes that I made to the request specs.

If there is anything you don't agree with, I'd be happy to discuss/revert it :)