Skip to content

Conversation

@joefiorini
Copy link

Had a conversation awhile back about this with David. He suggested the shortcuts which I have implemented. I'd love to see this get into core. Thoughts?

@dchelimsky
Copy link
Contributor

Looks good. I'll add this, but it needs to be in the next minor release, which won't be for another month or so (just released 2.5).

Copy link
Contributor

Choose a reason for hiding this comment

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

This ^^ needs to be ActiveSupport::TestCase::Assertion so it works with ruby 1.8 and 1.9

@dchelimsky
Copy link
Contributor

Hey Joe, wanna update the generated routing specs to use these too?

@joefiorini
Copy link
Author

Yeah, I would love to do that. Will try to get time in the next week or so.

@joefiorini
Copy link
Author

I just noticed a problem with this. It appears that ControllerExampleGroup includes RoutingMatchers which now redefines get/post/put/etc. Looking into a solution, does ControllerExampleGroup need to include RoutingMatchers?

@dchelimsky
Copy link
Contributor

Removing them would might break existing specs, so I wouldn't care to do so in a minor release. How about putting the helpers in a separate mode that only gets pulled into routing specs?

Joe Fiorini added 2 commits February 18, 2011 13:49
This is based on the conversation at http://groups.google.com/group/rspec/browse_thread/thread/52a0935544557693/9d437ba9566527b0?lnk=gst&q=fiorini#9d437ba9566527b0. It enables a couple shortcuts for specifying routes that makes it a little more in line with Rails 3.
ControllerExampleGroup also includes RouteMatchers, and since Rails already implements get, post, put, etc for controller tests the helpers clash.
@joefiorini
Copy link
Author

Closing this request to make sure the fix gets in with only 1 pull request.

This pull request was closed.
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