Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

be_routable fails when there are line breaks #8

Closed
sdhull opened this Issue · 7 comments

3 participants

@sdhull

I have run into this issue where paths that are genuinely routable fail the should be_routable assertion, apparently because of this line in rout_to.rb:

e.to_s =~ /<(.*)> did not match <\{\}>/ and @actual_place = $1 or raise

Where e.to_s is something like:

The recognized options <{"action"=>"foo",\n "controller"=>"bar",\n "arbitrary_param"=>"baz"}> did not match...

I have a test to drive this out and a fix in my fork. What I can't figure out is how to run the specs. Do I really have to do all this rspec-dev stuff to simply run the rspec-rails specs?

@dchelimsky
Owner

This is the tracker for rspec-rails-1. Please submit this to the tracker for rspec-rails-2 so it shows up as submitted by you and you can track responses. I'll give you a way to run the specs that doesn't involve the whole suite there.

@dchelimsky dchelimsky closed this
@sdhull

That's fine -- I will do that. But I actually want to fix it here for rspec-rails-1, as that is the version of rspec my client is using and I'd like my specs for them to run properly.

@dchelimsky
Owner

Got it. Well for rspec-1 you definitely have to do the whole rspec-dev thing, but if you want to just make a pull request I'll try to run it here. If everything passes we're good. If not I'll help you get set up.

@dchelimsky dchelimsky reopened this
@sdhull

Thank you! That's very nice of you. I did actually spend about 10 minutes trying to get rspec-dev setup, but it seems that maybe the instructions are a bit outdated (since they don't mention anything about Bundler, but there is a Gemfile in the repo). At any rate, I couldn't get the specs running properly, and for this small a change, I guess I won't feel too dirty sending you a pull request with a testcase and code that I haven't run (but am pretty sure will work).

@sdhull

Just sent you a pull request. I'm pretty sure it's a valid spec and fix, but please let me know.

https://github.com/dchelimsky/rspec-rails/pull/9

I wish it were clear how I could have linked that pull request to this issue, but maybe it's not possible?

If you agree that this is a good spec and fix I will do the same for rspec-rails-2 (especially if you tell me how to run the tests without setting up the whole rspec-dev thing). :)

@alindeman

Since #9 has been merged, should this be closed? @dchelimsky

@dchelimsky
Owner

I guess so :)

@dchelimsky dchelimsky closed this
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.