Created
October 11, 2013 00:06
-
-
Save ivanoats/6927641 to your computer and use it in GitHub Desktop.
better way to delete scaffold post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "test_helper" | |
| feature "PostDelete" do | |
| scenario "can delete a post" do | |
| @only = posts(:post_brand_new).id | |
| #Given I have a existing post | |
| visit posts_path | |
| #When I click the delete link | |
| puts "/posts/#{@only}" | |
| click_link('Destroy', href: "/posts/#{@only}") | |
| #Then post is destroyed and no longer seen | |
| page.wont_have_content posts(:post_brand_new).title | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment