similar to: Rails 1.1.2 Flash in Functional Tests

Displaying 20 results from an estimated 100000 matches similar to: "Rails 1.1.2 Flash in Functional Tests"

2006 Feb 07
2
validates_uniqueness_of case Sensitive
Is there a option to make validates_uniqueness_of Case Sensitive, if so what is it, if not then how to do it without writing my own function. Regards Suraj
2006 Apr 14
0
flash.now in functional tests
Hi, Does anybody know how I can access messages set using flash.now in my functional tests? assert_equal ''my notice'', flash[:notice] doesn''t. I guess that makes sense since they''re flushed as soon as the request request is finished. You can scan the HTML for a particular string you expect to be displayed, but is there a more direct way of doing this?
2006 May 10
0
Ezra''s acl_system2 and flash not getting populated in functional tests
Hi all, I am using the LoginGenerator and Ezra''s acl_system2 to protect certain actions in my controllers. I have written some functional tests to check for correct handling of redirects, flashes, etc. The flashes however only get populated on the first get action in any given test. Here is what I have so far: In the controller: class PageController < AC before_filter
2006 Jun 07
1
Flash Problem In Functional Test
I''m having some trouble with functional tests for a Rails application. I recently upgraded to version 1.1.2 of Rails and I have since noticed that I have a problem with flash notices in my functional tests. I''m not saying that the upgrade is necessarily the cause but the tests were working before. When I run the tests now and I expect the flash to contain a particular
2007 Mar 22
1
Functional test and flash with an error
I''m getting this error thats moaning about expected tag, but no tag found matching {:content=>"User James Apps was successfully created.", :attributes=>{:id=>"notice"}, :tag=>"div"} in the file application.rb. I tried using a regular expression - /#{user.first_name}/ , but that wouldn''t work either user_controller_test.rb 1) Failure:
2006 Jan 30
4
What is supposed to happen when you run dispatch.fcgi?
I''ve seen a number of posts where someone says, "What happens if you just run dispatch.fcgi directly?" Every time I do it, I get a "500: internal server error" message. I was just curious if that''s what''s expected running it directly. I assume so, because my apps all work fine, but that''s always bugged me. Pat
2007 Apr 21
0
Issues with Functional Tests
I''m running rails-1.2.3 under Ubuntu 6.06, and I''ve come across a few issues I''d like to raise. (1) If a controller sets flash.now[:notice] = "message", then in a functional test I don''t seem to be able to match it. flash.inspect shows "{}" and flash.now.inspect shows "#<ActionController::Flash::FlashNow:0xb63c4ecc
2009 Oct 07
2
Rails, flash, function and parameter
Hi, I try do update the flash on my page with ajax. I have this on my layout : <div id="flash_messages"> <%= render :partial => ''layouts/flash'' %> </div> I have this on my ApplicationHelper : def reload_flash page.replace "flash_messages", :partial => ''layouts/flash'' end and I try do that on my controller :
2011 Aug 28
3
rspec-rails render_views doesn't render layouts? / how to check flash isn't rendered
I''m trying to test that "static" pages (they''re ERB, but get cached), generated through rails, don''t render any stray flash notices left over by the authentication system (Devise) or wherever else. I''ve tried writing this controller spec, but it appears that response.body only renders the template, not its layouts? describe "so that static
2006 Jan 18
1
Problem with OCI in Apache
My Application runs fine when run on webrick, but throws up database error when run from apache. this is the copy of the FULL TRACE i get /usr/local/lib/ruby/site_ruby/1.8/oci8.rb:131:in `create'' /usr/local/lib/ruby/site_ruby/1.8/oci8.rb:131:in `initialize'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/oci_adapter.rb:515:in
2006 Feb 14
0
[REQUIREMENTS] Macromedia Flash View for Rails Controller
Hi I know there is no real requirements tag but I was unsure what to label this message, please don''t flame me :-). I am using the Javascript Integration Kit with Macromedia Flash to make a local connection to the rendered Rails view. I am then using Flash to render my page components (sort of like you do with Lazlo or Flex etc.) though Javascript acts as a proxy for me. Ideally I would
2009 Jul 01
1
[PATCH server] fixed expected status messages that were failing unit/functional tests.
--- .../functional/cloud/instance_controller_test.rb | 2 +- src/test/unit/vm_service_test.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/functional/cloud/instance_controller_test.rb b/src/test/functional/cloud/instance_controller_test.rb index 71d132b..0d713d4 100644 --- a/src/test/functional/cloud/instance_controller_test.rb +++
2006 May 05
1
testing for flash.now values
Is there any way in a functional test to get the value of the flash hash if the value was set using flash.now? It doesn''t appear to be visible in flash in the test. Example: Controller: def index flash.now[''notice''] = ''this is the index'' end Functional Test: def test_index_flash get :index assert_equal ''this is the index'',
2006 May 03
0
Accessing the params hash in a functional test not working
I am having problems reading params in a functional test (Rails 1.1.2). My test looks like this: fixtures :users def test_auth_bob @request.session[:return_to] = "/bogus/location" post :login, :user => { :email => "bob@example.com", :password => "test" } assert_session_has :user assert_equal @bob, @response.session[:user]
2010 Aug 17
3
Rails 3 flash message problems
The following code in my application_helper.rb class either eats the flash message or escapes it and does not display properly: # Outputs the corresponding flash message if any are set def flash_messages messages = [] %w(notice warning error).each do |msg| messages << content_tag(:div, content_tag(:p, html_escape(flash[msg.to_sym])), :class => "message
2006 May 26
1
flash.keep not working with render_component
Using Rails 1.1.2 and ruby 1.8.4 I''m having a weird issue with the flash when using render_component for an action inside different controller than the one from which you render. I''m passing an object via flash across a couple of actions (new and create) behind the scenes using flash.keep(:object). It works fine if the component I''m rendering is in the same
2006 Apr 19
1
Flash, Rails, and Routes
Hi all, I''m working on a Flash app that loads information from Rails, using Flash''s Loadvars() method. This is working great, in all browsers but Win/IE. I''m wondering if it has to do with some directory/security sandbox bug in IE''s handling of Flash, coupled with Rail''s routing. Below are some examples. Keep in mind that the .swf file is in the
2006 May 15
2
Flash & Rails Data passing
Hi, I am new to Rails and we are creating a web 2.0 app where we are integrating Rails and Flash. I dont know how to pass the values from flash to Rails to save in database. We have integrated the above specified with PHP and Rails. How to get the data from database and pass on the Flash thru Rails. Wht i exactly need is, We have 3 list box where when i select the first list box i need to
2011 Sep 27
1
Rails 3.1 assets path for video player Flash script 'player.swf'
I was using a Flash video player within a previous Rails version app Moving to Rails 3.1.0 , I dob''t know where I should put the script ... I tried to move it into an app asset sub-directory assets - jwplayer - - player.swf but this raises an error "NetworkError: 406 Not Acceptable - http://localhost:3000/assets/jwplayer/player.swf" player.swf the flash script is given as a
2006 Jan 13
4
Flash not cleared with ActiveRecord session store
Cheers, I''ve stumbled over a bug with 1.0 and ActiveRecord store for session while migrating from pstore sessions. I created the table with `rake create_sessions_table` and set `config.action_controller.session_store = :active_record_store` in environment.rb. Everything runs fine except that the flash messages will not be cleared. I get the same message everytime on everypage I