similar to: assert_redirected_to error

Displaying 20 results from an estimated 1000 matches similar to: "assert_redirected_to error"

2010 Feb 19
2
Problem with assert_redirected_to
I have taken over some old Rails code and am trying to get the tests to run. In the functional test every time the assertion ''assert_redirected_to'' is called I get the following error: test_should_update_venue(VenuesControllerTest): NoMethodError: undefined method `[]'' for #<Enumerable::Enumerator:0x102f747e0>
2006 Nov 30
41
TDD killing my joy of Rails
I''ve been working through the book ''Beginning Ruby on Rails E-Commerce'' which is very heavy on Test Driven Development. As in, you have to write tests for scaffolding methods and validations and crap like that. And then they fail. And you KNOW its the test not the method. So you spend 2x the time writing a test that has to be adapted when requirements change. You
2006 Nov 27
3
Power User Tipping Point: PHP to Ruby
I have been waiting for a tipping point to start using Ruby applications instead of PHP applications. My criteria include the availability of Ruby and RoR web hosts and Ruby equivalent applications readily available for PHP. I keep finding PHP applications to fill my needs but not Ruby applications or hosts offering Ruby support. For example, I use content management systems which are
2007 Feb 03
7
Interesting radio button behavior with "onclick"
Hello: I have radio buttons like this: <% fields_for :goalhist do |g| %> <table> <tr> <td align=left><%= radio_button_tag (''duedate'', 0, checked = false, options = {:onclick => ""}) %> &nbsp;&nbsp;Start now </td> </tr> <tr id="detailed" style="display: none"><td colspan=2>
2006 Nov 28
11
New Rails Site: Wordie
My latest stupid web trick, built, with love, in Rails: http://wordie.org Make lists of words. See who else likes the same words. Basically, it''s a dating site. Built on thanksgiving while half-watching football and launched yesterday. In other words, half-baked, but I thought some of you might find it mildly amusing. John ____________________________ John McGrath Squirl: a site for
2006 Jun 30
4
Strange behaviour from assert_redirected_to
I have this assertion in my tests: assert_redirected_to :controller => ''user'', :action => ''change_password'' It fails with: response is not a redirection to all of the options supplied (redirection is <"http://test.host/user/change_password">), difference: <{:controller=>"user"}> The redirection was: redirect_to
2007 Feb 04
10
where to install script.aculo.us ?
I''d like to try autocompletion, and my understanding based on AWDWR:2, and on various website tutorials, is that I should install the script.aculos.us javascript library. My question is how to do that. The instructions on their site tell me to "Put prototype.js, scriptaculous.js, builder.js, effects.js, dragdrop.js, slider.js and controls.js in a directory of your website,
2007 Jan 09
1
assert_redirected_to not working as expected
I''ve installed the "acts_as_authenticated" plugin and made some modifications to the controller (app/controllers/account_controller.rb) "signup" module as follows: === def signup @page_title = ''Create Account'' @user = User.new(@params[:user]) if request.post? if @user.save session[:user] = User.authenticate(@user.login,
2006 Oct 14
4
Editable data grid
Does anyone have a good recommendation for implementing an editable data grid (like a spreadsheet) based on a dbase table/model? What I would like is something similar to Google Spreadsheets. Thanks, Peter --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2006 Apr 05
11
Managing a Rails project
Can someone point me to some good ideas about managing Rails development - like what would be a good way to document all the models and controllers and methods that might result if several people are prototyping on different parts of a system, and what might be a good structure for pushing back code into SVN as scaffolds are turned into real projects - that sort of thing. I''m
2007 Mar 04
2
Installing
I have skimmed through many web pages, how to''s and editorials, my final conclusion is that the programming language for this particular part of the program is going to be Ruby. There are many reasons: 1. Apple will support it in 10.5 2. There seems to be a lot of support for it in the Mac community 3. Ruby developers seem to be Mac people. 4. There is better documentation than
2006 Jul 11
0
assert_redirected_to not recognizing routes
I''m getting a weird error in a call to assert_redirected_to in one of my functional tests. Here is the test: def test_signin admin = users(:adminuser) post :signin, {:login => admin.email, :realpass => @password} assert_redirected_to :action => ''list'' # failure happens on this line assert_equal admin.id, session[:user].id end The error
2006 Mar 22
0
assert_redirected_to behaviour
Consider following situation: you''ve got controller Foo that has following routing rules related: map.connect ''/foo'', :controller => ''foo'', :action => ''index'' map.foo ''/foo/:x/:y/:z/:action'', :controller => ''foo'' You want all Foo actions to make use of partial url rewriting, so instead
2006 Jun 17
3
What is this failure trying to tell me?
Here is my unit test code. post :login, :user=>{ :login => "bob", :password => "test"} assert_response :redirect assert_session_has :user assert_redirected_to :action => ''welcome'' Here is the failure I''m getting when I run my tests. 2) Failure: test_login_required(UserControllerTest)
2006 Aug 03
2
Failing test with assert_redirected_to
I''m having a strange problem with an assert_redirected_to in my controller test which hopefully someone can point out my failings with! ;) Controller method - def new if request.post? #Not important here. else flash[:notice] = ''Please join a tree from this page.'' redirect_to :controller => ''trees'', :action =>
2010 Aug 16
0
assert_redirected_to partial assertion does not work?
Hi, From the docs I see: http://api.rubyonrails.org/classes/ActionController/Assertions/ResponseAssertions.html This match can be partial, such that assert_redirected_to(:controller => "weblog") will also match the redirection of redirect_to(:controller => "weblog", :action => "show") and so on But it my case it does not work. As
2005 Mar 06
3
question about testing
Ok, so now I''m learning about testing. After a few initial hiccups, I''ve got my tests written nicely and all the assertions are passing. But I just have one question about doing tests in a loop. In my setup, I''m using the login generator to protect ''sensitive'' actions, while some actions are public. So I''ve got this line in my setup method:
2007 Feb 13
5
default database schema and relationships
hi everyone.. i''m a high school teacher who wrote a webapp in PHP and MySQL for my curriculum.. i use it to keep attendance, take notes per student or class and keep track of activities. i would like to soup it up and have read both the pickax and version 2 of agile web dev... now i''m starting to work and i''d like to rename columns and relationships in the database so
2007 Dec 24
1
Uninitialized constant in integration test
I am seeing weird issues when trying to create integration tests. Here is a very simple example of something that is failing. The assert_redirected_to, and other methods, fail with this or similar exceptions. I have tried requiring both ''application'' and ''listings_controller'', but neither solves this problem, although the exception changes. Anybody know
2007 Feb 12
18
document "expando" properties broken in Konqueror
I noticed that some of my event handlers and scripts evaluated in ajax responses didn''t work in Konqueror (3.5.5). document.getElementsByClassName is not defined in these contexts. I can work around this, by saving document.getElementsByClassName in a (namespaced) global variable once and reassigning it before each use. Still, this misfeature is annoying and not restricted to this