I have a 3 partial rail that lists all categories as a navigation menu - this is the highest, But all my template pages ... we say that about 75% I'm just trying to test in partial (RSPC), and I have realized a few things:
At the moment, I say to All in the real scene The difficulty is that, because it touches the data, my mock / stub is ignored in the visual device, and as a result the test fails.
I'm making an alternate guess that the application controller, and then partially pass it as a local variable. Nevertheless, about 25% of my page will not use the variable and I am thinking that there is another great way to do things.
In essence, I want to see the glasses test db, but I'm not sure that my partially a global variable, the best way to do it, is the best way to do it ... And I'm not declaring variables in all (and only) controllers who need it.
Any suggestions would be appreciated ...
Why to all categories Do not make subsidiary?
# categories in helper def all_categories @all_categories == class all endor ...
#Apple Controller helper_method: all_categories def all_categories ...Then you can touch this method in your spec and you can not touch DB
Comments
Post a Comment