similar to: route_for and nested resources

Displaying 20 results from an estimated 4000 matches similar to: "route_for and nested resources"

2010 Aug 30
1
undefined method `route_for' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:
Hello, all, I have this error with my rspec - controller - test, and yes, I do found the thread with the same error here, but it isn''t helped me, think it''s not my case. i have rails -v = Rails 3.0.0.rc, rspec -v = 2.0.0.beta.18 (hope they should match each other). my test is here: spec/controllers/posts_controller_spec.rb and i ran it with command: rspec
2008 Jan 31
11
ZenTest-3.9.0 incompatible with RSpec-1.1.2
Hey all, Just a heads up that the ZenTest-3.9.0 release is not compatible with RSpec-1.1.2. I thought I had a release ready to go, but differences between a preview release of ZenTest that I received and the actual release seem to have broken compatibility. We''ll get this resolved soon, but in the mean time please hold off on upgrading to ZenTest-3.9.0 if you''re using RSpec.
2008 Jan 27
8
Textmate RSpec Bundle ''it'' snippet
It seems to me that the RSpec bundle''s ''it'' snippet is in need of some love. By default, a newly inserted spec passes. This seems odd as it is misleading. It also makes it harder find what specs still need to be completed if you return to an RSpec module after a break. I propose that the ''it'' snippet is changed to the following: it
2009 Mar 02
2
Changes in specs for routes in rspec 1.1.99.x
Trying the next release of rspec, I have had to make changes in the existing specs for routing. I have written an script with sed that makes this automatically (two files) spec/upgrade.sed ================ /route_for/s/id => 1/id => "1"/g /route_for.*create/s/== \(["''].*["'']\)/== {:path => \1, :method => :post}/ /route_for.*update/s/==
2007 Aug 31
2
How to spec routes for a resource nested in multiples resources?
Hi, I got the resource "Llamadas" nested in: - Operadores - Productos - Centros Here is part of my routes http://pastie.caboo.se/92767 I want to spec that the routes for Llamadas, I tried several approachs: - route_for(:controller => "llamadas", :action => "exitosas", :operador_id => 1).should == "/operador/1/llamadas;exitosas" -
2010 Nov 16
4
view.should render_template best practices?
I''ve been looking for the definitive answer for months now, and the RSpec book doesn''t touch on it at all: How do we now handle stubbing out rendering of partials in view specs in RSpec2? I have a large (35K+ lines of views and related specs) that I''m trying to upgrade to Rails3/RSpec2. My views use partials pretty extensively and this issue is a huge blocker for me.
2007 Mar 27
1
REST rspec_generator
Is there some reason that the rspec resource generator produces code like this: context "Routes for the AnimalsController should map" do controller_name :animals specify "{ :controller => ''animals'', :action => ''index'' } to / animals" do route_for(:controller => "animals", :action =>
2009 Mar 17
1
Route failure with Rails2.3 and rspec1.2
Hello all, I have a spec for a route that used to pass under Rails 2.2.2 and rspec 1.1.12, but can?t figure out what is wrong since I updated. Here is the assertion: route_for( { :controller => ''purchase_orders'', :action => ''update'', :company_id => "32", :id
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.
2007 Sep 22
1
Testing RESTful routes
Hi all, The app I am making right now uses restful routing entirely. I want to prevent people from accessing my actions without the proper HTTP verb so I commented out the :controller/:action/:id catch all routes that were used in pre-RESTful Rails apps. Like so: #map.connect '':controller/:action/:id.:format'' #map.connect '':controller/:action/:id''
2006 Mar 02
3
Modifying "Find" to always add a condition?
I''d like to always add a condition to any version of "find" (e.g. Thing.find(), Thing.find_by_name(), Thing.find_by_whatever) so that in addition to whatever conditions are set, an additional condition is set :conditions=>"user_id=#{current_user.id}" I''d like to make sure that a user only sees/edits/creates entries in the database that have the user_id
2008 Jun 15
7
Getting "no block given" on find method - rails 2.1
I am trying to do a simple find through the current_user but get an exception. Either someone spiked my Starbucks coffee and I am screwing up all over the place or there is something wrong. def index @league = current_user.leagues.find(13) end # Error LocalJumpError in Admin/schedule todosController#index no block given If I pass a block to it it works fine, but it is just messy: =====
2008 Jun 25
0
Rspec routing_spec failing on nested singular resource
This should be easy to solve; I''m trying to get an Rspec routing_spec working with a singular nested resource; map.resources :users do |user| user.resource :profile end All the tests in the profile_routing_spec seem to be failing because they can''t match the routes, for example; # The spec describe ProfileController do describe "route generation" do it
2006 Apr 08
4
New UPS protocol choice - Dynamix
Gidday all - I'm a new user to nut. I've got some cheap powerpal UPSs working fairly well. However I also have a new Dynamix UPS-1700D and an old Powercom KIN-1700 something unit that I cannot make work right. The best method I've found is "trial and error" which sounds a bit last-resort. Is there any better way to find out what protocol is used? -- Criggie
2015 Jan 06
3
Radeon graphics problems with CentOS 6.6
On Sat, Jan 3, 2015 at 2:27 PM, Darby Vicker <darby.vicker at gmail.com> wrote: > On Saturday, December 20, 2014, Darby Vicker <darby.vicker at gmail.com> wrote: >> >> I thought about trying centos 7. But in the end that doesn't really >> help me since I'm trying to keep my current centos 6 installation >> working. I don't really have the
2014 Dec 21
2
Radeon graphics problems with CentOS 6.6
I thought about trying centos 7. But in the end that doesn't really help me since I'm trying to keep my current centos 6 installation working. I don't really have the time/energy to reinstall everyting under CentOS 7 right now. I was able to get a 6.6 LiveCD built myself. The liveCD has the same problem - X doesn't work. I can boot the "Basic Video" option from the
2007 Dec 16
3
how do I spec my Rails routes?
Once again, here''s something I haven''t figured out. Apologies if this is too newb-ish, but, how do I spec my routes using RSpec-Rails? In particular, I''ve got a catch-all route that needs to catch a wide variety of URLs: map.document ''*url'', :controller => ''documents'', :action => ''show'' Is there a way to
2005 Apr 08
10
ProxyARP in a Routed environment
Hi, In a routed network setup , is it possible to use ProxyARP given the condition that the shorewall external interface and the DMZ interface are in a completely different network . That means the gateway of the External interface and the hosts in ProxyARPed DMZ zones are in different network. eth0 ---in 220.227.X.Y/30 -- shorewall external interface eth1 ---in 220.227.A.B/27 -- shorewall
2009 Jan 16
5
Help: OpenId and restful_acl
Hi All, I have restful_authentication with restful_acl installed on my app, now I want to use OpenId with restful_acl,so my question is... does this make any problems for me or not? I haven''t explored the OpenId for ROR yet, and I am going to do that now,but I just wan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed
2010 Sep 11
2
Dynamix 650 VA USB UPS
Hi, Has anyone had success with the Dynamix 650VA, that uses the USB cable? I can't get megatec_usb to recognize it, I have tried both stable and development versions. Regards Glen Ogilvie