AWDR the book: page 156 session_options


#1

I’m trying to run the tests in chapter 12. My problem is,
session_options is undefined. I also find it strange that two different
versions of actionpack is being used, as the stack trace below
indicates.

Test file: depot_testing/test/functional/login_controller_tests.rb

def test_index_without_user
get :index
assert_redirected_to :action => “login”
assert_equal “Please log in”, flash[:notice]
end

C:\svn_christer\rails\depot_testing>ruby
test/functional/login_controller_test.r
b
Loaded suite test/functional/login_controller_test
Started
EEEE.
Finished in 1.222 seconds.

  1. Error:
    test_index_without_user(LoginControllerTest):
    NoMethodError: undefined method session_options=' for #<ActionController::TestR equest:0x3f86ea8> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/sessi on_management.rb:115:inprocess’
    c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.5.1/lib/action_controller/test_p
    rocess.rb:260:in process' (eval):3:inget’
    test/functional/login_controller_test.rb:35:in
    `test_index_without_user’

#2

Remove old version of actionpack.


#3

Christer wrote:

Remove old version of actionpack.

Still a worry that RubyGems appeared to be allowing code from different
versions to be loaded.

Justin