search for: dcmang

Displaying 10 results from an estimated 10 matches for "dcmang".

Did you mean: demang
2007 Oct 16
5
RailsStory - lessons learned
After trying RailsStory for a few days, I have learned: 1. Rails testing support does not serve up static pages 2. RailsStory masks errors generated by the app under test 3. The masked errors are available in log/test 4. I should read log/test more often See http://pastie.caboo.se/107876 for an example for points 2 and 3 The welcome controller fails when the HTTP_USER_AGENT is missing.
2007 Jul 22
3
Retrieving validation messages without making errors
I would like to inform the users about attribute validation conditions for form fields using title as in <span title= "cannot be blank" >. The simplest way would be to use the validation error messages already defined in the models, but I cannot find any way to retrieve these messages, when no error has been made. The methods I have tried as errors.full_messages only returns the
2007 Sep 26
10
How do I best setup data for Story Runner?
Just started looking at the Story Runner integration, and am converting a few Rails integration tests to get a feel for it. My integration tests relied on fixtures, and since my models have a significant amount of validation (and hence need valid data unless I save without validation), this has made setup easy. With stories however, I''m wondering what the recommended approach is.
2007 Aug 18
12
Test::Unit to RSpec
So I''ve just started working on a rails project which currently has something like 7500 LOC. All of the tests are written in Test::Unit, although the test coverage is pretty poor: rcov says that 25% of the code is covered, while rake stats shows the code to test ratio as 1:0.1 (800 lines of test code). I guess I''m wondering what would generally be advisable here. Is it
2007 Nov 13
1
Using multiple Ruby versions
Is there a way to setup multiple versions of Ruby to use with different projects like we can with the version of Rails? On my dev machine I have Ruby 1.8.6 with Rails 1.2.3, which works fine. But one of my projects uses Rails 1.2.2, which turns out to have problem with Ruby 1.8.6. Instead, Ruby 1.8.5 is required. Is there a way to have both versions of Ruby installed, and specify which one a
2008 Sep 22
1
question about render
Hi there, i have a question respect to the "render" when use render in the controller def create @contacto = Contacto.new(params[:contacto]) respond_to do |format| if @contacto.save flash[:notice] = ''Su Consulta ha sido enviada'' crear_correo(@contacto) format.html { redirect_to(:action => :new) } else format.html
2007 May 11
3
is_active?
Hey all, i''m rather new to rails and was curious if ActiveRecord implemented anything like is_active where the delete functions would just mark records as inactive, vs deleting rows. (similar to created_at, etc). I need a history of transactions, and this is how I would code in other languages. Any advice? Is there are smarter way to implement this? Thanks in advance! -- Posted via
2007 Oct 04
16
Spec/Test Speed
...Some of the suggestions I''ve heard are: - In Memory Database w/ Sqlite. As far as I know, no one has gotten this to work (with rspec, at least) - Using faster hardware. I don''t have the budget right now for a better machine. One interesting idea is this one: http:// www.dcmanges.com/blog/deep-test-preview, although as far as I know, it doesn''t work for rspec. - Only running specs per file, and using continous integration to do the rest. Right now this isn''t an option for testing my User model, which has 92 examples, and takes 20 seconds. Also, I...
2007 Sep 07
12
Preconditions
Sorry, lots of questions these days. Is there a normal approach for preconditions? In JUnit, I might put a few assertions in the setUp() just to make sure that the test ''data'' I''ve created meets expectations before going to test it. So, for instance, I''ve got an object that is audited using acts_as_audited and I''d like to test the XML that results
2009 Feb 22
16
Strange error when running rails 2.3 on ruby 1.9.1 on FreeBSD
I am trying to run rails on FreeBSD 7.1. I''ve already installed Ruby 1.9.1 (from ports), apache, passenger (edge version from git), Rails 2.3 RC 1 (using gem --source like described on the weblog.rubyonrails.org). Everything installed smoothly and I am able to run ruby 1.9.1 programs. The problem is when I try to run rails. It fails with this error: [grzesiu@cratan ~/.gem/ruby/1.9/gems]$