Topic: Performance tests with Ruby-Prof and fixture questions
I am using some articles I found on using ruby-prof and functional tests. My goal is to work out my application and find areas to improve performance.
However, I am not terribly familiar with rails testing and fixtures. What I expect to be happening is not happening.
In my case I expect that the data in my users.yml fixture will be inserted into the database and be available to User.find(:xyz) methods. However, my assertion always fails because the User.find_by_remember_token("test_remember_token") always returns nil. So I assume that means my fixture data is never making it into the database, which I thought the 'fixtures: users' statement should do.
Can someone please let me know where my understanding is wrong?
Thanks in advance.
Here is relevant users.yml content:
Here is my functional test source: DashboardControllerTest:
require File.dirname(__FILE__) + '/../profile_test_helper'
class DashboardControllerTest < Test::Unit::TestCase
@controller = DashboardController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
user = User.find_by_remember_token("test_remember_token")
assert_not_nil user, 'no user with remember_token'