incorrect view spec example #50

Closed
honki91 opened this Issue Dec 2, 2012 · 2 comments

Projects

None yet

3 participants

@honki91
honki91 commented Dec 2, 2012

The example presented:

describe 'articles/edit.html.haml' do
it 'renders the form for a new article creation' do
  assign(
    :article,
    mock_model(Article).as_new_record.as_null_object
  )
  render
  rendered.should have_selector('form',
    method: 'post',
    action: articles_path
  ) do |form|
    form.should have_selector('input', type: 'submit')
  end
end

is compliant to only webrat, not capybara.
(jnicklas himself explains it here: teamcapybara/capybara#384)
Since you recommend using capybara and there is no indication to the reader that it is a webrat compliant example, it seems to be problematic.

Contributor

👍

Owner
bbatsov commented May 21, 2014

This section was removed from the guide.

@bbatsov bbatsov closed this May 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment