Adding view specs #70

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
5 participants
Contributor

sauy7 commented Aug 27, 2012

As discussed in Google Group. See also blowmage/minitest-rails-capybara#4

This pull request fails (merged 345e69a into 41bfe16).

This pull request fails (merged 1c7243d into 41bfe16).

Owner

blowmage commented Aug 27, 2012

I know scaffolds are not very popular, but I'm wondering if we should provide some guidance on how to write view tests by providing them. Thoughts?

@ghost ghost assigned blowmage Aug 27, 2012

Collaborator

zenspider commented Aug 27, 2012

On Aug 27, 2012, at 14:30 , blowmage notifications@github.com wrote:

I know scaffolds are not very popular, but I'm wondering if we should provide some guidance on how to write view tests by providing them. Thoughts?

Personally, I think scaffolds are great. Esp wrt to teaching someone new to rails how stuff interacts across the system.

Scaffolds are useful, because people can learn from them, both when to use them and when not to.

Contributor

sauy7 commented Aug 28, 2012

I'll look into adding the generators to this pull request

Contributor

sauy7 commented Aug 28, 2012

I've actually changed my mind about this now. I'm not sure that adding view tests is compatible with the project aims of "expos[ing] MiniTest with minimal changes for testing within Rails".

To add view specs/tests goes against the traditional "functional" tests that combine controller and view tests.

Moreover, my original commit was too simplistic with regard to view testing as it does not work when partials are rendered from other templates. Whilst writing the additional scaffold generator test templates fro the views is easy, supporting view tests/specs AFAICT means more effort along the lines of what was done in rspec-rails.

I think it might be enough to just add the RSpec matchers from Capybara to the minitest-rails-capybara plugin to both Helper and Controller tests and leave it at that.

@blowmage blowmage closed this in 1bc3486 Sep 18, 2012

@sauy7 sauy7 referenced this pull request in blowmage/minitest-rails-capybara Dec 2, 2012

Closed

Adding Capybara RSpec Matchers to view specs #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment