[rspec-devel] [ rspec-Bugs-6674 ] rspec_on_rails fails on @session deprecation warning?

noreply at rubyforge.org noreply at rubyforge.org
Sun Nov 19 15:31:03 EST 2006


Bugs item #6674, was opened at 2006-11-14 18:44
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6674&group_id=797

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Steve Ross (sxross)
Assigned to: Nobody (None)
Summary: rspec_on_rails fails on @session deprecation warning?

Initial Comment:
rSpec 0.7.2 and rspec_on_rails 0.7.2 on Edge Rails (5473).

I'm not certain that the deprecation warnings are causing this, but that's how it looks to me. By the way, the line 'puts self.class' outputs 'F'. Is this expected?

Simple view test:

require File.dirname(__FILE__) + '/../spec_helper'

context "/member/index" do
  setup do
    @member = mock("member")
    @content_for_title = 'sign up for mailing list'
    @member.should_receive(:member)
    assigns[:member] = [@member]
  end
  
  specify "should show signup page" do
    puts self.class
    render '/member/index'
    response.should_have_tag 'div', attributes =>{:id => "intro"}
  end
end

Results:

1)
RuntimeError in '/member/index should show signup page'
Deprecating @session, but it's already set to #<ActionController::TestSession:0x2a98e84 @attributes={"flash"=>{}}>! Use the session= writer method instead of setting @session directly.
/Users/sxross/rails/kudzu/config/../vendor/rails/actionpack/lib/action_controller/base.rb:1049:in `assign_deprecated_shortcuts'
/Users/sxross/rails/kudzu/config/../vendor/rails/actionpack/lib/action_controller/base.rb:1044:in `assign_deprecated_shortcuts'
/Users/sxross/rails/kudzu/config/../vendor/rails/actionpack/lib/action_controller/base.rb:1035:in `assign_shortcuts_without_flash'
/Users/sxross/rails/kudzu/config/../vendor/rails/actionpack/lib/action_controller/flash.rb:140:in `assign_shortcuts'

Finished in 0.063727 seconds

1 specification, 1 failure
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -I"/usr/local/lib/ruby...]

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2006-11-19 20:30

Message:
Moving this to bugs

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=6674&group_id=797


More information about the rspec-devel mailing list