router specs incorrectly pass
Reported by Matt Albright | June 27th, 2008 @ 11:48 PM | in 0.9.4
Given the following line in router.rb:
r.match(%r"/v(\d+\.\d+)/:controller/:action", :method => :post).
to(:api_version => "[1]")
The following spec incorrectly passes:
request_to("/v1.0/accounts/create", :post).
should route_to(Accounts, :create).
with(:api_version => '3.14')
This is broken for 0.9.3 as well as edge as of Jun 27 2008.
Comments and changes to this ticket
-
Yehuda Katz (wycats) June 28th, 2008 @ 02:17 AM
(from [38f1b58fc2a0c9be3b21ccb5da03f38d4c9166a9]) Added spec for the route matcher testing regexp routes. [#386]
-

Ben Burkert June 28th, 2008 @ 02:21 AM
I wasn't able to reproduce the failure, but that doesn't meant it working. I added a spec to test a route with a regular expression. If you can create a spec that fails, submit a patch and I'll see about fixing it.
-

Matt Albright June 28th, 2008 @ 03:01 AM
Ok, I figured it out... when I said it was broken on edge, I was wrong.
I'm using frozen-merb, and froze edge without installing it on my machine, so my specs were using 0.9.3.
Is there a way to make rspec use the frozen version of merb to run its tests?
-
Yehuda Katz (wycats) June 28th, 2008 @ 07:37 AM
(from [aee1144d79c63a4ecd6ba5a2e1a8ddca9aaef70c]) Merge branch 'master' of git@github.com:wycats/merb-core
- 'master' of git@github.com:wycats/merb-core:
Added spec for the route matcher testing regexp routes. [#386]
Add Merb.started? alias for Merb.started reader.
Add reader for @started flag which shows when Merb environment is started.
better log message
rescue excpetions in Worker thread, log them and then restart the work queue
Router now can do r.match("/this/old/url").redirect("/where/this/resides/now").
Refactor Merb::Test::RequestHelper and introduce build_request helper.
spoke too soon.
we actually don't need to log this at all as its logged latert in the _benchmarks
Update link to wiki page on Rack in exception.
Add link to Rack page at wiki to Controller not found exception. This confuses people a lot.
Log namespaced controller name when it's class is not found.
I will test first next time, I promise.
Tell what's actually started when Dispatcher begins to handle request.
Fixed typo in yet another exception message.
Log an info message when route fixation actually happens. Those heavily using Flash will find it helpful.
Log a warning if controller class cannot be found.
A bit more verbose exception message when route does not specify a controller.
Documentation: add deprecation warning to AbstractController. Manually applied patch from dstar.
Increase header level on sub-headers of Filters in AbstractController
-
Michael Klishin (antares) June 28th, 2008 @ 08:10 AM
- → Milestone changed from to 0.9.4
- → State changed from new to invalid
Looks like spec examples are added and they pass on HEAD. Closing as invalid, leave a comment if I am wrong.
-
Yehuda Katz (wycats) July 6th, 2008 @ 01:55 AM
(from [9778c2109288e66673f1c4846917d5e8aeb54626]) Merge branch 'master' of git@github.com:wycats/merb-core
- 'master' of git@github.com:wycats/merb-core:
Spec for previously applied patch to Behavior#defer_to.
use Route#register in defer_to so that deferred routes get an index
Make Autotest ignore doc/ as well.
Ensure Autotest ignores changes in log directory.
Add helpers directory to load path
Modules don't get duped right.
Redo Merb's inheritable_accessors so that they have correct semantics, then redo everything that uses inheritable_accessors so they don't have to hack around the bad semantics.
Added spec for the route matcher testing regexp routes. [#386]
Add Merb.started? alias for Merb.started reader.
Add reader for @started flag which shows when Merb environment is started.
-
Yehuda Katz (wycats) September 18th, 2008 @ 09:29 PM
- → Tag changed from merb-core router rspec spec to merb-core router rspec spec
(from [c4844d90052a530aec0bd43a0fa4acdd5de47e47]) Merge branch 'master' of git@github.com:wycats/merb-core
- 'master' of git@github.com:wycats/merb-core: (55 commits) Fix bug with :status Spec for :status in display display handles :status and :location Improved RDoc of Merb#load_dependencies. script/frozen-merb => merb-freezer in RDoc Adjusted logging message for thin sockets vs ports. Added socket option to thin.rb and to the command line options. send_file opens files in 'rb' binary mode so windows doesn't shit itself fix nginx_send_file Spec for previously applied patch to Behavior#defer_to. use Route#register in defer_to so that deferred routes get an index Make Autotest ignore doc/ as well. Ensure Autotest ignores changes in log directory. Add helpers directory to load path Modules don't get duped right. Redo Merb's inheritable_accessors so that they have correct semantics, then redo everything that uses inheritable_accessors so they don't have to hack around the bad semantics. Added spec for the route matcher testing regexp routes. [#386] Add Merb.started? alias for Merb.started reader. Add reader for @started flag which shows when Merb environment is started. Update memory session storage documentation. ... http://github.com/wycats/merb-co...
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
