How do I figure out why errors are occurring when running unit tests on app that is being upgraded from Rails 2.3 to Rails 3.0?


Hosein Mohtasham
HOME ยป Programming Languages

I've been tasked with upgrading an app from Rails 2.3.5 to 3.0.19. This also involves upgrading Ruby from 1.8.6 to 1.8.7. After this upgrade is complete and stable, the plan is then to move to Ruby 1.9 and Rails 3.2.


Gems (output from bundle install), fyi:


Using rake (10.0.3)
Using abstract (1.0.0)
Using activesupport (3.0.19)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.19)
Using erubis (2.6.6)
Using rack (1.2.7)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.35)
Using actionpack (3.0.19)
Using mime-types (1.19)
Us

Related to : How do I figure out why errors are occurring when running unit tests on app that is being upgraded from Rails 2.3 to Rails 3.0?
How do I figure out why errors are occurring when running unit tests on app that is being upgraded from Rails 2.3 to Rails 3.0?
by Hosein Mohtasham in Programming Languages

I've been tasked with upgrading an app from Rails 2.3.5 to 3.0.19. This also involves upgrading Ruby from 1.8.6 to 1.8.7. After this upgrade is complete and stable, the plan is then to move to Ruby 1.9 and Rails 3.2.


Gems (output from bundle install), fyi:


TAGS: figure errors occurring when running unit
Rails unit tests: How to add my own output to unit test results
by Ohad Barzilay in Programming Languages

When running Rails unit tests I get output specifying line numbers and methods when a test fails, e.g.:


1) Failure:
test_05_photo_tag_add_remove(TC_javascript02Test)
[./helper/helper.rb:6:in `handle_assert'
./helper/helper.rb:17:in `check_not_string'

Upgraded from Rails 2.3.4 to 2.3.14 and now tests are failing (Shocking, I know)
by juma in Programming Languages

The problem seems to be with all tests that do POST, PUT, DELETE requests. It seems that csrf token is not being attached with those requests. Thus I get redirected to /login. It's perfectly fine with GET requests of course.


It's worth to mention that actual browser interactions are


Simply Rails 2 - p 240-241 Unit tests
by Mansur in Programming Languages
EDIT: This problem has been solved in Thread 635869, which I unfortunately didnt find until just now.
Original post:
When I run the unit test from pages 240 and 241 in Simply Rails 2, I get an error. The error is caused by the votes that I create in the votes fixture being in the wrong ord
Rails-Book: Question about 2 unit tests
by rituraj in Programming Languages
Hello, may be somebody can tell me the reason why?
I worked myself through the Rails-book of Patrick Lenz and found every thing working well except for 2 assert-failures, for which a have no explanation.
After reinstalling Ruby, Rails, Database and Shovell-Code-Archive the 2 failures still
Helper functions in Rails unit tests
by whatintheworldisthat in Programming Languages

I'm using this sort of code in my code in my Unit tests.


test "should be awesome" do
assert true
end

I'm using FactoryGirl instead of fixtures.


I find that I'm repeating myself a lot and having helper functions would be quite useful. W


Can Rails unit tests be run on a different environment than test?
by jwright30 in Programming Languages

We have a large multi-developer project under Rails in which we are using tests for both models and controllers. Right now the developers have to switch the DB parameters for the 'test' environment to match their local dev environments before running tests. I am wondering if there is a way to run


DateTime Problem in Rails Unit Tests
by highland145 in Programming Languages

I'm working on unit tests for my Rails app and have run into the following problem.


I have an Event model with a fixture that boils down to:


concert:
name: Wallflowers
start_at: <%= DateTime.new(1999) %>

In my unit test


Pass Parameters to Rails Unit Tests
by fayoh in Programming Languages

I was wondering if there is a way to pass arguments to individual tests in rails similar, or similar in idea, to NUnit's TestCase Attribute. Thanx


Is it possible to debug unit tests in Ruby on Rails?
by GreenChile in Programming Languages

So, I just moved to new project that is built on Ruby on Rails. I'm new to it and I'm still learning it. I can debug most of the application code, but it seems I can not debug unit test code and code that is tested.


When I run unit testing in debug mode, I can set a breakpoint in unit


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2014 © bighow.org All Rights Reserved .