…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, …
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…
/ 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 …
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.
Jasmine's syntax should be very familiar to anyone who does RSpec BDD work, and the work we've done in our spec helper really cleans up the beforeEach setup that's required in each individual controller spec. These particular tests make heavy use of ngMock, which you won't always need to use, and the calls to flush() are required to fulfill pending requests, preserving the async nature of the backend but allowing the tests to execute synchronously.
…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 …
…written from the perspective of a user clicking around the application and filling in forms. We use RSpec and Capybara , which allow you to write tests that can interact with the web page in this manner.
Here is an example RSpec feature test: # spec/features/user_creates_a_foobar_spec.rb
feature 'User creates a foobar' do scenario 'they see the foobar on the page' do visit new_foobar_path
fill_in 'Name', with: 'My foobar' click_button …