Displaying 20 results from an estimated 100 matches similar to: "assert_generates and catch-all routes"
2010 Feb 15
1
possible bug: using assert_recognizes with extras
Hi.
I am trying to use the extras hash parameter in assert_recognizes. I
am using.
assert_recognizes(expected_options, path, extras={}, message=nil)
I have something similar to the documentation:
assert_recognizes {:controller => ''items'', :action => ''list'', :id => ''1'', :view => ''print''},
2006 May 17
0
Strang Behavior when testing Routes
I have the following route:
[code]
map.connect
'':platform_filter/:software/:version/:platform/:distribution_channel/:id'',
:controller => ''user/version'',
:platform_filter => /all/,
:platform => /windows|macintosh|unix|linux/,
:distribution_channel => /Download|download/,
:action => ''download'',
:id =>
2011 Apr 21
0
Routing assertions
Hi
Thanks for help me out
I have two routes :
match ''admin/categories'' => ''admin#categories'', :as =>
''admin_category''
match ''admin/categories/:sub_category'' => ''admin#categories''
In rspec
2009 Mar 15
0
rspec-rails 1.2.0 Released
rspec-rails version 1.2.0 has been released!
* <http://rspec.info/>
* <http://wiki.github.com/dchelimsky/rspec>
* <http://wiki.github.com/dchelimsky/rspec/rails>
* <http://wiki.github.com/dchelimsky/rspec/upgrades>
Behaviour Driven Development for Ruby on Rails.
Changes:
### Version 1.2.0
IMPORTANT INFORMATION: Due to changes in Rails-2.3, there are some changes
in
2008 Jan 02
1
assert_recognizes with requirements => {:method => something}
I''m having trouble with my routing, and was wondering if anyone else
had seen something similar.
I''ve got these two routes:
map.login ''/login'', :controller => ''sessions'', :action =>
''new'', :requirements => { :method => :get }
map.connect ''/login'', :controller => ''sessions'',
2006 Jan 07
2
Functional tests with routes
Hi all,
I''m trying to do a route test using assert_generates and running into a
bit of trouble.
The controller that I am testing is in a module -
class Admin::AdminPortalController
def index
end
end
I want the user to jump to the AdminPortal/index action when they use
http://myApp/admin, so I''ve put the following in routes.rb
map.admin_portal
2006 May 09
1
name_url in tests
Hi there,
I posted earlier asking about testing named routes in functional tests, but got no response, so I''m making my question less specific.
It seems from the docs that it''s possible to to test named routes in cases such as:
asserts_redirect_to name_url(:param => "whatever")
but I haven''t seen any mention of it being used with any other tests and I keep
2009 May 02
10
Problem verifying routing error
Hi,
When upgrading to rspec/rspec-rails 1.2.6 gem (from 1.1.12), I''m having
a new problem verifying routes that should not exist.
This is to support something like this in routes.rb:
map.resources :orders do |orders|
orders.resources :items, :except => [:index,:show]
end
I used to use lambda {}.should_raise( routing error ), but it stopped
detecting any raised error.
2006 May 18
6
Routes and Testing Routes
I love the routes feature for RoR...until now. I''m trying to write tests
to make sure my urls are correctly mapping to the routes I expect them
to map to. This is driving me nuts because I simply can''t get any of my
tests to pass. I have thus concluded that routes must work differently
than I thought. If someone could possibly point me in the right
direction, I would really
2007 Jul 02
6
Testing route globbing and limitations of get()
Hi everyone,
I''m new to rails and also to rspec, but I tried to do my homework. To answer
my questions, I searched this list''s archives, the Rails API, and Google, to
no avail. Therefor, I''d be grateful if someone could point me in the right
directions:
1) There doesn''t seem to be a counterpart to assert_recognizes in rspec.
route_for() won''t work
2006 May 18
2
Help with Routes
I love the routes feature for RoR...until now. I''m trying to write tests
to make sure my urls are correctly mapping to the routes I expect them
to map to. This is driving me nuts because I simply can''t get any of my
tests to pass. I have thus concluded that routes must work differently
than I thought. I will try to explain my understanding of how routes
work. Via this
2006 Feb 09
2
Finding related items (like latent semantic indexing)
I''ve been trying to use Classifier::LSI to provide a means of finding
''related items'', where each item is a one line description of a product.
Although on small samples the Classifier works great, it completely
baulks on my current dataset of 3000 items.
I''ve started to look at ferret this morning, following a post on the
ruby mailing list. I''d
2006 Apr 22
3
Creating a select dropdown box with links to methods
What would be the best way to create a form select dropdown box and upon
"submit" have it directly go to a controller method view?
I have something that somewhat works, but I think there is probably a
much easier way to do it. As of now, I have the dropdown list which
when the form is submitted is handed to a controller method which
basically
I have my dropdown box:
<%=
2006 Feb 14
8
Assigning has_many child in parent creation question
If I have...
class Parent
has_many :children
end
class Child
belongs_to :parent
end
...then...
* Assigning a _new_ child during parent''s creation saves the child
record with the parent''s id.
child = Child.new
Parent.create(:children => [child])
# Results in child being associated with parent
* Assigning an existing child after a parent''s creation
2006 Jul 02
3
homepage_url ?
does the routes.rb have some kind of automatic generated url_for a ''''
map.connect?
(say, something like url_for_homepage or homepage_url) ...i''ve looked
around, tried a couple of combos but nothing really worked. do i have
the wrong lead?
?
thanks...
--
Posted via http://www.ruby-forum.com/.
2005 Dec 15
3
site home page
Hi,
I have a really dumb qustion, but I can''t find an answer in "Agile Rails" or
any other hand holder. And, it is a difficult topic to search for in
google.
What controller/view is used for the home page of a site? I get how to
create new controllers, but I don''t get at all how to change content on the
home page.
thanks,
matt
On 12/14/05, Austin Ziegler
2006 Jul 05
2
How to write get functional test when there is no action by that name
I have following line in route.rb
#event info for an event name
map.connect ''event/:name_url'',:controller => ''home'',:action =>
''event_info''
It causes a URL like http://localhost:3000/event/_jewels_exhibition_ to be
sent to the home controller with action as ''event_info''.
I am trying to test this action. My first
2013 Dec 24
2
Sieve is not getting the propper RCPT from the LMTP daemon
Hi!
Since the setup I use is a bit strange let's go for it first:
* The system uses postfix as MTA and dovecot as LDA after alias
translation by local via LMTP
* The dovecot version is 2.2.5 and the pigeonhole version is 0.4.1
* The SMTP server at gentoo.org is configured to send me a backup of my
emails to klondike+gentoo (at) xiscosoft.es using sendmail
* The email is received by the server
2005 May 25
1
/var full issue: FreeBSD 5.4, Samba 3
I encountered something a little strange today.
Previously I had enabled samba logging and forgot to disable it. Unsurprisingly my /var partition maxed out. To correct this, I disabled the logging and deleted the (approx 240 MB) samba log file. Strangely I still had a full /var partition. Running df gave me:
SRV04# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad4s1a
2004 Aug 26
5
TDM400P Problems
Hi,
I have just started to setup and configure my asterisk box and am
having trouble with it. I have a dlink nic in the box as well as the
digium card. When the nic is in there by itself it works, but when I
put the tdm400p in, there seems to be some sort of conflict with the
network card. The tdm appears as another type of network card, which I
don't think it should, should it? It shows