Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Add render_views to all controller specs #648

Closed
shippy opened this issue Jul 9, 2014 · 5 comments
Closed

Add render_views to all controller specs #648

shippy opened this issue Jul 9, 2014 · 5 comments

Comments

@shippy
Copy link
Contributor

shippy commented Jul 9, 2014

Currently, views do not get evaluated by our tests at all. Invoking render_views means that whenever we invoke a controller action, RSpec attempts to render the view template as well, rather than mocking it. At the cost of some slow-down, this means that template code gets executed and thus tested for syntax errors, which - in absence of view specs, which we don't plan to write - is a bare minimum we can do.

@orenyk
Copy link
Contributor

orenyk commented Jul 9, 2014

Good idea! We can revisit the idea of view specs, if you think they'd be worth the time to write. Since our current design is pretty well ironed out, we'd mostly be testing after the fact.

@shippy
Copy link
Contributor Author

shippy commented Jul 9, 2014

I'm not sure - I think view specs are more pain than gain, but I'm honestly not clear on what they should be testing. Maybe we should consider it if we can't figure out how to make integration tests ( #416 ) work?

@orenyk
Copy link
Contributor

orenyk commented Jul 9, 2014

Sure. When I did the Rails Tutorial we wrote tests to ensure that various UI elements were present on different views, but I guess those were more in the context of integration tests. There's probably more value in writing them before the design of the views is finalized, although I guess it's also hard to be specific about what should be where without actually doing the layout beforehand. I'm not sure they're worth the time at this stage, but we can keep them in mind.

@orenyk
Copy link
Contributor

orenyk commented Aug 27, 2014

This is definitely worth doing, especially in the absence of integration tests. Moving to v4.1.

@orenyk orenyk added this to the 4.1 milestone Aug 27, 2014
@orenyk orenyk removed the 1 - Ready label Sep 3, 2014
@orenyk orenyk modified the milestones: 4.1, Pre-Export, Wish List Oct 15, 2014
@orenyk
Copy link
Contributor

orenyk commented Apr 12, 2015

Now that integration tests are working and we've got a bunch of them set up (see #1219), I don't think we need the overhead of testing views in the controller specs. We should just work on expanding our integration test suite.

@orenyk orenyk closed this as completed Apr 12, 2015
@orenyk orenyk removed this from the Wish List milestone Apr 12, 2015
@orenyk orenyk removed the diff: 1 label Apr 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants