erwinjunker / regressor

Generate specs for your rails application the easy way. Regressor generates model and controller specs based on validations, associations, enums, database, routes, callbacks. Use regressor to capture your rails application behaviour.
MIT License
206 stars 33 forks source link

Syntax error in generated controller specs #14

Open roflomglol opened 9 years ago

roflomglol commented 9 years ago

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 commented 9 years ago

Oh, maybe it's related to #12

erwinjunker commented 9 years ago

Hi,

could you post the controller code you are using?

Erwin

roflomglol commented 9 years ago

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.

erwinjunker commented 9 years ago

Should be fixed together with #12 in version 0.5.7