…Sass; behavior-driven development ( BDD) with Capybara & Rspec; better automated testing with Guard & Spork; roll your own authentication with has_secure_password; and an introduction to Gherkin & Cucumber. These focused video lessons help you learn crucial new skills fast— and put them to work immediately! Watch top Rails developer Michael Hartl guide you through building a complete application using today's best practices for MVC and REST design, layout, …
The testing syntax itself is very block heavy. But other than that, it follows RSpec's syntax almost exactly.
The category method: Starting with the desired end state
We'll start in the same place as we would in Ruby. Given a string ("example string"), we expect to be able to call a method to get a reversed version of that string ("gnirts elpmaxe"): // NSString_ReversedSpec.m
# import "NSString+Reversed.h"
…, I need to explicitly include all libraries in this cookbook, since RSpec by default is only going to load tests in the spec directory.
I've also set up spec_helper to run any ChefSpec tests against resources in my cookbook proper, so I can run unit tests for everything just with one command.
I hang my head in shame before Martin Fowler if I screwed up the definitions of "mock" and "stub", but I think I got it right.
/ for testing
Skinny models, controllers, and a service layer
But his metaphor breaks down a little, because the second stack isn't really a stack:
A considerable minority uses a stack like this. It's important that the Stack isn't exact: you might not use Cucumber at all, for example, or maybe you don't have a service layer.
On the (private, but cheap) Ruby , I came up with … "Parley" email list
My Rspec specs suddenly stopped working with the following error: Failure/Error: Unable to find matching line from backtrace DRb::DRbConnError: druby://127.0.0.1:8989 - #
Oddly, the first two tests were working, then the rest exploded. Turns out the culprit was raising an exception in the initialize() method of the class being tested, like so: def initialize( account ) raise if !account.kind_of?( UserAccount ) ... end
The first two tests tested the exception state, like …
Introducing EstimationParty - Google+ Hangout addon to allow teams to put together estimates and plan iterations.
Softcover - A publishing platform based on the - Build and publish ebooks with media. tutorial
rails-mrap-seed - seed project including , , , RSpec, and Capybara.
Luculent - family for developers with plenty of hinting and legible rendering at tiny sizes.
I think it is important to actually understand the code that I copy/paste, so I took a little time to read up on the details which I've summarized below.
Favorite Testing Gems…
…valores diferntes dependendo da localização escolhida atualmente. If we would add an Rspec spec to cover this behavior, it would look like this: describe Article do before(:each) do I18n.locale = :en @ article = Article.create title: "Hello World", body: "Test" I18n.locale = :"pt-BR" @article.update_attributes(title: "Ola Mundo", body: "Teste") end
context "translations" do it …
Human Testing: sometimes nothing beats enlisting the help of others to pound away on our beloved projects. You'd be surprised by how many issues are found by this approach, often leading to cries of, "But users aren't supposed to do that!"
Non-technical users: enlist someone who can has a hard time finding the / key. This type of …
Support for - Using custom RSpec matchers to make sure you don't break configurations. Driven Devops
List of - There are too many of them. that to JS
Never Write a Web Scraper Again - A visual approach to scraping.