Released: Oct 02, 2009, Running time: 43 min
In this episode:
In this episode we add the ability to remove Search terms from a Brand.
Add to cart$5.00Released: Oct 02, 2009, Running time: 43 min
In this episode:
In this episode we add the ability to remove Search terms from a Brand.
Add to cart$5.00In the previous episode we added the ability to create search terms for a Brand. We also need a way to remove these search terms, in case we don’t want them around anymore in case they bring in too much noise, or if they are just not as relevant as we thought.
Watch us add the “delete” action to the “searches” resource.
First, we refactor the “Manage Brand” feature first, as we notice a repeating pattern in our scenarios.
Webrat steps generated by Cucumber are a nice start, but in order to press a specific button on the page, it has to be constrained to a certain DOM element. We add a step to make it easy to find just the button we need for delete. To make this work, our views need to be structured more semantically.
One way to debug Webrat steps is to use “save_and_open_page” to show what Webrat sees when a certain step fails.
Controller specs might get a bit repetitive at this point, but that is no excuse to abandon them — they will provide an important harness for when we have to refactor controller code.
If you are using Textmate and Git, then you might find the Git.tmbundle helpful. Towards the end of the episode you can watch how to use it for easier commits directly from TextMate.
5 comments
takaaki
10 months ago
Having an alias for “rake rcov:all && open coverage/index.html” might be useful.
takaaki
9 months ago
You guys can use “But” instead of “And”.
For example.
Then I should see “Deleted search term.”
But I should not see “jschoolcraft”
takaaki
9 months ago
Just a thought: if you guys write a spec for DB columns, you could enforce that more with specing index. I often forget add indexes especially when working with an impossible deadline.
Istvan Hoka
9 months ago
In reply to takaaki
You guys can use “But” instead of “And”.
For example.
Then I should see “Deleted search term.”
But I should not see “jschoolcraft”
I didn’t know “But” was part of Gerkin syntax.
Thanks!
wb9
about 3 hours ago
First of all we thank you for making such a site would be. We are linux truly burmeh yaza lida fx15 biber hapi ile formda girin grateful celtikli koyu and your website such as forums such as kiralik ps3 the and got feeds site for development purposes and the development of important steps have been taken, it ps3 kiralama is necessary to closely monitor your posts. Almost everything I read, I hope playstation kiralama it will continue