similar to: Testing route globbing and limitations of get()

Displaying 20 results from an estimated 11000 matches similar to: "Testing route globbing and limitations of get()"

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.
2008 Apr 11
4
request.params causing errors
Hello, I have a rhtml file that goes through the request.params. One of my test generates that file, but rspec pops an error saying : undefined method ''params'' for ... I''m not sure what to do with this, since request.params actually works with rails. Any idea? Thank you Olivier Dupuis -------------- next part -------------- An HTML attachment was scrubbed... URL:
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
2007 Mar 28
3
respond.should be_successful
I''m wondering: Does it make more sense to add on successful? as an alias for success? in ActionController:TestRequest? I keep getting these two mixed up in my specs and was wondering if it would be helpful to anyone as a small patch to rspec. Best, Scott
2007 Dec 01
5
specifying an HTTP status code
Hi all, I''m just starting to work w/ RSpec, so I hope this question isn''t too obvious or missing the point somehow: Is there a way in RSpec to specify that a controller action should use a specific HTTP status code? Specifically I want to test for the usage of 301 as opposed to 302, for a permanent redirection. response.should be_redirect looks like it calls
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 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 Nov 21
6
route_for and nested resources
I can''t figure out how to make the updates to allow for the route_form method to return a url that matches the expected. Here is a sample route_for(:controller => :task, :action => :new).should == "/task/new" If a task has to be created for a user, how exactly do I do this. The following doesn''t work: route_for(:controller => :task, :action => :new,
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
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''},
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'',
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
2003 Sep 17
1
globbing doesn't work locally
You wrote: >On Fri, Aug 15, 2003 at 03:37:21PM -0700, Rob McMillin wrote: >> This is on rsync v2.4.5 on RedHat 7.3. >> >> If I do something like >> >> rsync ... 'somehost:/path/to/files.*' /local/path >> >> it works fine, but if I do >> >> rsync ... '/local/path/to/files.*' somehost:/path/to >> >>
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" -
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 =>
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
2020 May 17
2
[Bug 3165] New: man sshd_config does not define order of includes when using globbing
https://bugzilla.mindrot.org/show_bug.cgi?id=3165 Bug ID: 3165 Summary: man sshd_config does not define order of includes when using globbing Product: Portable OpenSSH Version: 8.2p1 Hardware: amd64 OS: Linux Status: NEW Severity: trivial Priority: P5 Component: sshd
2013 Dec 09
2
[PATCH] sysprep: allow to specify globbing for --delete
Adapt the globbing part from the old --remote-path work previously proposed for sysprep [1], allowing --delete to perform globbing when deleting paths. [1] https://www.redhat.com/archives/libguestfs/2013-October/msg00045.html --- sysprep/sysprep_operation_delete.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysprep/sysprep_operation_delete.ml
2003 Aug 16
1
globbing doesn't work locally
This is on rsync v2.4.5 on RedHat 7.3. If I do something like rsync ... 'somehost:/path/to/files.*' /local/path it works fine, but if I do rsync ... '/local/path/to/files.*' somehost:/path/to globbing fails, yielding an error about being unable to find a file named 'files.*': link_stat /local/path/to/files.* : No such file or directory rsync error: partial
2016 Feb 04
0
[PATCH v2 2/2] customize: add globbing for --delete
Support globbing in paths passed to --delete, telling glob to not return directories with leading slash. This re-adds back globbing for --delete in virt-sysprep, which was available before the integration with common code from virt-customize. --- customize/customize_run.ml | 2 +- generator/customize.ml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git