Testing the draft attribute of this post model (Rspec + Capybara)
问题 I want to write a test using Rspec and Capybara. I have a Post model and I want to add a draft attribute to it. If the user checks that field the post is saved as draft ( draft = true ). Only posts that have he attribute draft = false will show in the post index page. Posts with draft = true will only show in the page of the user who created that post. I've never made a Rspec + Capybara test in my life. So I was wondering if someone could tell me how to start or give me an example. Thanks in