regressor icon indicating copy to clipboard operation
regressor copied to clipboard

Syntax error in generated controller specs

Open roflomglol opened this issue 10 years ago • 4 comments

Hey,

I have encountered a problem using your gem. Controller specs generator created this kind of spec for me:

it { should use_before_filter(:_callback_before_45(self)) }

It raises an error

syntax error, unexpected '(', expecting ')' (SyntaxError)

I'm not sure why. Please advise. :)

Thanks, Sergey

roflomglol avatar Aug 06 '15 13:08 roflomglol

Oh, maybe it's related to #12

roflomglol avatar Aug 06 '15 13:08 roflomglol

Hi,

could you post the controller code you are using?

Erwin

ndea avatar Aug 06 '15 13:08 ndea

I think it has something to do with load_and_authorize_resource of CanCan gem. Those specs disappear if I comment this code in controllers of "corrupted" specs.

roflomglol avatar Aug 06 '15 14:08 roflomglol

Should be fixed together with #12 in version 0.5.7

ndea avatar Aug 07 '15 07:08 ndea