Cannot set subject for ActionController::TestCase test suites #185

dcuddeback opened this Issue Aug 27, 2011 · 2 comments


None yet
2 participants

I ran into this problem when upgrading an app from shoulda 2.10.3 to 2.11.3 as part of a Rails 3 migration. I have a lot of tests that set an explicit subject for a context block, but shoulda 2.11.3 forces the subject to be the @controller instance. This results in a lot of NoMethodErrors being raised.

I wrote a patch and unit test for this, which is available here:

That branch is off of the v2.11.3 tag, because it seems as if your master branch is moving toward separate context and matchers gems, which aren't released yet and to which these patches don't seem relavent. Would you mind including my patch in the next 2.11 release?


gabebw commented Mar 18, 2012

Hi, thanks for filing a bug.

Is this still a problem in the latest version of shoulda-context?


gabebw commented Mar 30, 2012


gabebw closed this Mar 30, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment