Rails 2.3 Functional Test Failures

69 views
Skip to first unread message

Glenn Rempe

unread,
Mar 16, 2009, 4:13:04 PM3/16/09
to shoulda
Hi,

I am in the midst of attempting to update a recently built rails app
from Rails 2.2 to 2.3.2. I have run into a number of issues along the
way with breakage, but I've been able to fix them all so far with some
quick google'ing. However, the latest one has me stumped so far.

I am able to run my unit and cucumber feature tests clean. My
functional tests are hurting though now with all failures similar to
the following (here is a pastie of the same errors in case of
formatting problems - http://pastie.org/418026 )

34) Failure:
test: The public on :get to :index should respond with 401
Unauthorized and render sign_in template. (UsersControllerTest)
[vendor/gems/thoughtbot-clearance-0.5.3/shoulda_macros/
clearance.rb:51:in `__bind_1237233893_298967'
vendor/gems/thoughtbot-shoulda-2.10.1/lib/shoulda/context.rb:
253:in `call'
vendor/gems/thoughtbot-shoulda-2.10.1/lib/shoulda/context.rb:
253:in `test: The public on :get to :index should respond with 401
Unauthorized and render sign_in template. ']:
template was expected to be sign in (sessions/new).
expecting <"sessions/new"> but rendering with <"">

I am using Shoulda 2.10.1 and Clearance 0.5.3 (my list of errors is
not limited to those tests within the clearance gem).

All tests pass clean and green on my master branch which is not yet
converted to rails 2.3.2.

Is Should incompatible with 2.3? If so is the fix coming soon?

Thank you!

Glenn Rempe

unread,
Mar 16, 2009, 4:22:13 PM3/16/09
to shoulda
As a follow up this may also be related to this bug report re:
assert_template (since recinded from Rails. I reached out to the
developer to ask him about it):

http://rails.lighthouseapp.com/projects/8994/tickets/2166-assert_template-broken-in-231

Dan Croak

unread,
Mar 16, 2009, 4:26:50 PM3/16/09
to sho...@googlegroups.com
Hi Glenn,

Are you using Passenger? If so, are you on the latest version?

Dan
--
Dan Croak
http://thoughtbot.com

Glenn Rempe

unread,
Mar 16, 2009, 4:31:07 PM3/16/09
to shoulda
Hi Dan,

Yes, I am am using passenger. And I just updated yesterday to 2.1.2
which is the very latest AFAIK.

Thanks,

Glenn

Glenn Rempe

unread,
Mar 16, 2009, 5:15:37 PM3/16/09
to shoulda
OK, Dan. I think I figured it out and fixed it.

I was sent down the right path by this bug report:

http://rails.lighthouseapp.com/projects/8994/tickets/2011-assert_template-symbol-passes-whatever

And when I implemented the following two one-line diff's to both
Shoulda and Clearance my broken tests all passed. Perhaps you can
bake this change into those projects?

http://pastie.org/418093

:-)

Cynthia Kiser

unread,
Mar 16, 2009, 5:21:10 PM3/16/09
to sho...@googlegroups.com
Glenn thanks for posting the fix.

One thing I am confused about. Why would using or not using Passenger
make any difference to functional tests? I thought the request and
response stuff was stubbed out for testing. So how would your hosting
setup affect functional tests?

Quoting Glenn Rempe <gl...@rempe.us>:
>
> OK, Dan. I think I figured it out and fixed it.
>
> I was sent down the right path by this bug report:
>
> http://rails.lighthouseapp.com/projects/8994/tickets/2011-assert_template-symbol-passes-whatever
>
> And when I implemented the following two one-line diff's to both
> Shoulda and Clearance my broken tests all passed. Perhaps you can
> bake this change into those projects?
>
> http://pastie.org/418093
>
> :-)
>
>
> On Mar 16, 1:31?pm, Glenn Rempe <gl...@rempe.us> wrote:
> > Hi Dan,
> >

> > Yes, I am am using passenger. ?And I just updated yesterday to 2.1.2


> > which is the very latest AFAIK.
> >
> > Thanks,
> >
> > Glenn
> >

> > On Mar 16, 1:26?pm, Dan Croak <dcr...@thoughtbot.com> wrote:
> >
> >
> >
> > > Hi Glenn,
> >
> > > Are you using Passenger? If so, are you on the latest version?
> >
> > > Dan

> --~--~---------~--~----~------------~-------~--~----~

Glenn Rempe

unread,
Mar 16, 2009, 5:23:02 PM3/16/09
to shoulda
I don't know the answer to that Cynthia. I was simply responding to
Dan's question. And he's the ThoughtBot guru. :-)

G

On Mar 16, 2:21 pm, Cynthia Kiser <c...@caltech.edu> wrote:
> Glenn thanks for posting the fix.
>
> One thing I am confused about. Why would using or not using Passenger
> make any difference to functional tests? I thought the request and
> response stuff was stubbed out for testing. So how would your hosting
> setup affect functional tests?
>
> Quoting Glenn Rempe <gl...@rempe.us>:
>
>
>
>
>
> > OK, Dan.  I think I figured it out and fixed it.
>
> > I was sent down the right path by this bug report:
>
> >http://rails.lighthouseapp.com/projects/8994/tickets/2011-assert_temp...

mjankowski

unread,
Mar 20, 2009, 2:57:02 PM3/20/09
to shoulda
Hey Glenn,

Can you provide a sample test which passed in 2.2.2 and now fails in a
2.3.2.1 app?

It'd be good to see both the functional test and the failure you see.

-Matt

Side note - I may have fixed your clearance problem w/out trying to,
with another commit I made earlier today to clearance. I've bumped
gem to 0.5.4, once that builds, check it out.

Glenn Rempe

unread,
Mar 22, 2009, 11:27:18 AM3/22/09
to shoulda
Hi matt. I just started a vacation and I am not sure I will be allowed
near my computer anytime soon. If I don't get to create a failing test
soon please don't let that block things.

Cheers

Glenn
Reply all
Reply to author
Forward
0 new messages