Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Spec helper support for prefixes? #49

Open
mbhnyc opened this Issue · 6 comments

2 participants

@mbhnyc

I'm sure this is on the list, but just in case, it doesn't seem possible to use a version prefix (even an optional one in a controller spec, I get a missing route error.

Or is there a way to construct the version that works?

@Sutto
Owner

I'm not 100% sure I remember the intricacies of the version prefix code (this is one of the bits that I'd mentioned was an unknown / uncertainity) - but the idea is primarily your controller test doesn't need the prefix, only the normal version integer - the routes are the bits that care about that). That said, it should be possible to use one - So I'll take a look today.

@mbhnyc

Interesting — in my case, when I only have the integer in my controller test (using default_version 1) I get a route not found error.

@Sutto
Owner
@Sutto
Owner

I spent a bit of time investigating this this morning and it appears the way we pass the version prefix information to the controller is the cause of the issue. Namely, we use the :default hash which appears to break url generation from parameters.

@mbhnyc

Nice! Sorry on a bit of a deadline and wasn't able to provide an example!

@Sutto
Owner

No problem - apologies I haven't been able to fix it yet, I've not had much time to look deeply into the internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.