Open jibiel opened 8 years ago
Thank you for Issue.
So my question is do you have any workaround for the cases like this one? Probably the test mode like these thingies have:
Currently, No, I do not.
but it would be nice to be able to disable gon completely for some types of specs while keeping it intact for the integration specs.
It sounds good iead.
Have any workable solutions emerged on this issue?
Greetings, gentlemen.
Gon
never gave me any pain until last night when I decided to write specs for one of my controller concerns (simplified example):So the problem is with the
get :new
request from withinshared_examples_for
block. When I writeget :new
directly in my controller spec, everything's fine.I also have
gon
callback disabled for the test environment:or even have commented it out:
Nevertheless it throws me the above-mentioned
NoMethodError: undefined method 'uuid' for nil:NilClass
. I've also tried to mock therequest
object, no go.Only when I remove
gon
competely from myGemfile
the requests from theshared_examples_for
and the controller specs are starting to show the same behavior.So my question is do you have any workaround for the cases like this one? Probably the test mode like these thingies have:
I guess for now I could explicitly specify the gem for all the environment groups except
:test
in theGemfile
:but it would be nice to be able to disable
gon
completely for some types of specs while keeping it intact for the integration specs.