similar to: view/manipulate session data in integration tests?

Displaying 20 results from an estimated 100000 matches similar to: "view/manipulate session data in integration tests?"

2006 Apr 03
1
Functional tests use ''test.host'' whereas integration tests use ''www.example.com''
I just added my first integration test, and noticed that it uses www.example.com as the domain name. Functional tests, on the other hand, use test.host. I only found this out because I''m actually checking the domain name in requests. Apparently the DSL I create in the integration test should then become available to the rest of the functional tests..but I need the host name to be the
2006 May 31
0
Help with xhr request in integration tests
Hello, The documentation at api.rubyonrails.com for ActionController::TestProcess#xhr or xml_http_reponse gives method as the first parameter and action as the second parameter folled by the parameters hash, etc. But ActionController::Integration::Session#xhr has a path, followed by the parametes hash, and apparently no alias for xhr. Of course, the documentation in the AWDwR book would tend to
2006 Jul 17
3
functional tests run fine on their own but fail with rake
this is a weird one. i have 8 functional tests classes. when I run them individually, they all pass. When i use rake or ''rake test:functionals'' one of them fails. I''ve traced the error back to a problemwith reading data from the session. when running the tests individually, the data is there. when run using rake, it''s nil. has anyone come across anything
2006 Jul 27
7
''remember me'' using cookies
I''m about to implement this, and I''m thinking of storing the user''s id and their hashed password in the cookie after a successful authentication. can any see an obvious security issue with this? I know the method is vulnerable to cookie theft but am i missing anything? thanks alan
2006 Jul 20
0
possible file upload bug in integration test
I created an integrations test that attempted to uploade a file as follows: def uploaded_file(path, content_type="application/octet-stream", filename=nil) filename ||= File.basename(path) t = Tempfile.new(filename) FileUtils.copy_file(path, t.path) (class << t; self; end;).class_eval do alias local_path path define_method(:original_filename) {
2006 Nov 23
0
TypeError on loading fixtures for integration tests
Functional tests properly load fixtures, but my integration test chokes: # def self.create_fixtures(fixtures_directory, table_names, class_names = {}) # puts("fixtures dir: "+(fixtures_directory.nil? ? "nil" : fixtures_directory)) It''s only nil for my integration tests. I''m on rails edge. Does anyone know what I''m doing wrong here? 1) Error:
2005 Nov 19
1
How I provide a session object to Functional Tests?
People, I''m looking at p. 152 in the Rails book where he talks about testing controllers [ functional tests ]. First he shows a method, test_login_with_valid_user, which tests that it''s possible to login with a valid user/password combo. Then, he talks about extracting the code he just wrote and placing it into a login method inside of test_helper.rb Once the method is there,
2007 Jan 26
0
Problems with assert_select in integration tests
I''ve been battling with assert_select in my integration tests for several evenings now. I''m testing a multi-step form, and after submitting the first step, my assert_selects fail on the attempts to find the form on the next page. However if I print out the response object, it has the exact text of what I''m trying to match. Here is the complete integration test. The
2006 Jun 24
2
contents of /lib automatically loaded?
I''ve written a simple replacement (not extension) of Ruby''s array class with some added functionality. I defined it in array.rb and put the file in rails_root/lib but when i fire up the console the class isn''t being loaded. How can I have my class automatically loaded and used instead of the built in Ruby class?
2006 Aug 16
15
OT: finding a designer (bit of a rant)
I''ve written my app already. It outputs valid xhtml and I need a stylesheet to drop over the top. How hard is it for people to understand that? It''s a small project, they''d have to do the main design/layout, and then a little custom styling for some specific elements which don''t appear on every page. That''s the point of CSS right? write once, use
2008 Feb 29
5
outside-in = integration tests on views?
Hi, In the spirit of "outside-in" are given-when-then scenarios supposed to be integration tests of views? Or should we be accessing the model interfaces directly (not through a view)? Thanks, David :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080229/dc6b1660/attachment.html
2006 Jul 08
0
Testing cookies - integration tests
Hello, I''m trying to test some cookie code with some integration tests, but I''m not sure if this is possible. Currently I''m creating a session (using open_session) running some code that sets my cookie and this works fine, the cookie is being set. Now cookies are supposed to exist across different sessions, so I try to create a new session (again with
2006 Apr 04
1
integration tests - 1.1
I?m using the new 1.1 integration test facility? I?m trying to write a test that sees if a controller redirects to the correct place and preserves the query string. Here?s the code: class LoginRedirectTest < ActionController::IntegrationTest def test_non_admin_auth request_uri = "/datafeed/event/report?blah=blah" get(request_uri) follow_redirect!
2011 Jan 10
2
Integration in R
Dear all, It has been ages since I studied integration in college. Right now I try to recover all this kind of knowledge and then try to understand how integration works. Thus I am doing some first 'experiments' and I would like to request your help and comments. I have the function: p2<-function(x){0.5*(3*x^2-1)} # I found the square of p2 by using some pencil and
2006 Jul 13
4
why I don''t like to use some 3rd party plugins
I''m not a professional developer in the sense that I''ve had any formal training or experience. I taught myself programming two years ago and have since moved to ruby and shortly after to rails - even now, i only develop as a hobby. This means that a lot of developer best practises are foreign or unknown to me, that''s why I love rails so much. You learn so much just
2010 Nov 19
1
Help: delegated association 'App' returning ActionDispatch::Integration::Session instead
class Foo < ActiveRecord::Base has_one :bar delegate :app, :to => :bar end class Bar < ActiveRecord::Base belongs_to :app def self.attribute_column_names return @@attr_columns if defined?(@@attr_columns) readers = content_columns.map { |n| n.name.intern } - [:created_at,:updated_at] @@attr_columns ||= readers.map { |k| [k, "#{k}=".to_sym] }.flatten end
2006 Jun 24
2
gettext and maintenance
hi all my app has two languages, I''m using gettext to manage them and so far so good. My question is about maintenance. If I fix a typo in a _() enclosed string, for example in an rhtml file, then the translated version of that string will no longer be valid will it? even if the translation itself had no errors. Is that the case and if so will i be forced to have the _() string
2007 Apr 11
1
outCALL- the open source Asterisk integration applicaiton for Microsoft Outlook
Bicom Systems releases outCALL, an Asterisk open source Outlook integration LONDON, UK (11th April 2007) - Bicom Systems announced today it has released outCALL, an open source desktop application allowing integration Microsoft Outlook. OutCALL allows users an easy way for placing and receiving phone calls integrated with users Outlook contacts. "The open source PBX market needed
2007 Oct 30
5
Using Standard Integration Tests with RSpec
Hi there. I am using RSpec for unit and functional testing on a project. I have however found the (experimental) RSpec stories to be un-intuitive in some situations. The RSpec plugins seems to disable the standard Rails Tests, so how could I go about usng Integration tests alongside Rspec? Thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~
2006 Apr 03
0
follow_redirect! aborts rake during integration tests
I''m running integration tests on Rails 1.1/Ruby 1.8.4/Windows XP and have found that any call to follow_redirect! (directly or through [get|post]_via_redirect) causes rake to abort (see command line output below). Has anyone else seen this error, or know what might be the trouble? Thanks! Tom C:\dev\h2h>rake test:integration --trace (in C:/dev/h2h) ** Invoke test:integration