similar to: Delete the fixtures on a functionnal test

Displaying 20 results from an estimated 2000 matches similar to: "Delete the fixtures on a functionnal test"

2007 Apr 19
4
render_to_string in a model ?
I have a batch job that will call script/runner, I would like in this call to create html formated email and save it to the database. This is easy enough in a controller with yournewhost.email = render_to_string :action => "email_newhost_ready", :layout => false But render_to_string is only available in controller action pack, is there a easy way to render_to_string in a Model? Or
2007 Jul 21
3
manging rescues
What''s the recommended way to catch errors like this: NoMethodError in Register#confirm Showing app/views/register/confirm.rhtml where line #4 raised: undefined method `namen'' for nil:NilClass I get this error when someone does somethinh like: http://.........../register/confirm?email=jkdsfadslkjflksd If I make: remail = params[:email] @user = Request.find(:first,
2007 Jun 27
5
Regexp not matched
Sorry, meant to post this in the rails forum. Anyways, how would I write a rescue method to recover from a failed regexp parsing with error "regexp not matched" -Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post
2007 Jul 07
6
Help in upgrading from 1.1.6 to 1.2.3
Hi, I was developing a rails app with version 1.1.6 that just worked fine. I decided to upgrade to 1.2.3 and then, I keep getting that horrible message: "Application error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html" Now, before starting script/server I modiffied config/environment.rb and
2007 Jul 23
1
readline (LoadError)
hi, i''m a noob in ror, today i bought a book to learn ror. i do everthing that stand''s in this book, and the shit does''t work! i use Aptana IDE with RadRails the problem is: Loading development environment. /usr/lib/ruby/1.8/irb/completion.rb:10:in `require'': No such file to load -- readline (LoadError) from /usr/lib/ruby/1.8/irb/completion.rb:10 from
2007 Jul 10
3
need to add XTHML class attribute, link_to's html options?
I need to add a class attribute to the elements generated by link_to for my CSS to style the links. How can I do that? <%= link_to "Artworks", :controller => "artwork", :action => "list" %> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"
2007 Jul 06
3
assert_equal - problems returning value from controller
Hi, I have the following assert_equal that is returning false. @q seems to be returning niil, but is set in the controller, how can I get hold of this value in my tests? assert_equal ''derby'', @q Thanks Mark -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2007 May 09
1
Why Devel Stop ?
Hi, I ask me why the devel of RubyTorrent is stop for 2 year ? You haven''t time or other reason ? Thanks for your answer. -- Cyril Mougel
2007 Jul 14
3
observe_field, does this generate HTML?
I don''t have Rails installed at the moment, I''d like to check myself, but it''s just a simple curiosity. observe_field fits into replacement tags <%= %>, which caught my attention because as far as I know it''s just javascript observing a field and should not stick anything into HTML. Is <%= merely used as an enabling method, or will there actually be
2005 Nov 10
6
Manually loading fixture data
Hi all, I''ve got some tables with fixed amounts of data in them (a "states" table, for example). For tables like this I can easily put *all* of the data in the fixture. For general futzing purposes, and for those times I want to reload a database from scratch outside of testing (for whatever reason), what''s the best approach? I thought perhaps ActiveRecord::Base had
2007 Aug 27
7
Foreign key constraints, fixtures, and rake task
I''ve got a spec that loads a fixture in the "before" block. This works fine running scripts/spec, but when I run rake spec instead, I get: ActiveRecord::StatementInvalid in ''User in fixture :quentin with an IM service but no IM name should be invalid'' Mysql::Error: Cannot delete or update a parent row: a foreign key constraint fails
2007 Jul 19
8
Where do I put code for my own types?
Sorry for all the questions today... Beyond the obvious things--models, controllers, helpers, and other framework-related types--where should I put the code for my own types? For example, I was thinking of writing my own AJAX-friendly paginator, but I don''t know where to put the code for that sort of thing. I would prefer to keep things object-oriented, so I would rather do a lot of
2006 Mar 01
1
maddening intermittent failures in unit tests with "working" code
Hi all, This testing problem has been a sink for time today, and is still unresolved. Basically I have some unit tests that test simple functions (example below) that depend on join operations in a habtm relationship, and I suspect I am getting "false" failures, i.e ones that do not logically make any sense. I need fresh sets of eyes to take a look and see if I''m mising
2006 Jan 10
5
problems overriding module with plugin
Hi I am trying to create a plug-in to fix the error in the rails core produced by the multiple delete on a HABTM relationship. I have confirmed that my plug-in is being included into the base during runtime however the code does not seem to be overridding the base class. module ActiveRecord module Associations module ClassMethods def has_and_belongs_to_many(association_id, options =
2005 Dec 23
2
SQLite in-memory
I left ":memory:" in database.yml for testing and the most simple tests in the Agile book do not work (see trace below for test_truth). Since that''s what comes with the distributed database.yml I suppose it''s me doing something wrong. Did someone get SQLite ":memory:" working? How does it grab the schema? -- fxn % rake test_units (in
2006 May 17
1
Functionnal testing : Watir vs Selenium
Hello, I wonder if some of you have evaluated these two solutions and how they compares each other. What did you liked or disliked ? And may be are you aware of others functionnal testing tools usable with and integrated with Ruby ? Thanks -- Posted via http://www.ruby-forum.com/.
2009 Nov 13
1
[PATCH server] Replace the occurence of the type @qmfc.object(Qmf::Query.new(:class => "xxx", 'key' => search_key)) for @qmfc.object(Qmf::Query.new(:class => "xxx"), 'key' => search_key) else the search on the key is not functionnal.
This fix db-omatic that cannot recover the node on wich the vm run for example. We have not investigate far away but that can be due to a change on the ruby-qmf API. Signed-off-by: Michel Loiseleur <mloiseleur at linagora.com> --- src/db-omatic/db_omatic.rb | 10 ++++++---- src/libvirt-list.rb | 6 +++--- src/matahari-list.rb | 4 ++-- 3 files changed, 11
2005 Dec 30
1
Problems with Testing (Depot) demo app in Agile Rails book
I''ve encountered a perplexing problem whilst following along the demo app in the "Agile Web Development with Rails" book. Any help would be greatly appreciated. Here is a brief time line of my tale of woe:- 0. Been programming (business apps) and designing/building DBs for two decades - but new to both Ruby and Rails (so I apologise in advance if I''ve made some
2007 May 19
0
Logger Vs rt_debug
Hi, In rubytorrent, you use a rt_debug function in util.rb. So why don''t use the logger require, with a const in Rubytorrent module ? There are a particular raison or not ? Regards, -- Cyril Mougel
2008 Sep 14
2
Postgres adapter issues with Rails 2.1: ruby-pg is the answer!
While upgrading Rails 2.0.2 sites to Rails 2.1.1, I encountered a weird postgres adapter problem. Although the old postgresql adapter (aka ruby-postgres) works fine with Rails 2.1.1 on my Mac dev box (running PG 8.2.6) and also works fine with Rails 2.0.2 apps on a Debian etch staging server (running PG 8.2.1), this error occurs when trying to cap deploy 2.1.1 apps on the Debian box: