Rails includes milliseconds in Time / DateTime objects when rendering them as JSON: JSON.parse(User.last.to_json)['created_at'] #=> "2001-01-01...

...separate process. # You'll also benefit from code reloading. if Rails.env.development? require 'sidekiq/testing' Sidekiq::Testing.inline!

Are you adding a "Then show me the page" and re-run Cucumber whenever there is a failing scenario? Don...

This finally works: User.any_instance.should_receive(...) as does User.any_instance.stub(...) Note: You won't have RSpec 2.6 if you're still working...

makandracards.com

In Spreewald 1.10.4+, nested patiently blocks are now patient. Here is an example: patiently do outer_code patiently do

When you cannot make Selenium trigger events you rely on (e.g. a "change" event when filling in a form field...

TL;DR In blueprints, always wrap associations in blocks. # Broken Task.blueprint(:vacation) do project Project.make(:vacation) hours 8 accounting_method...

Consider the following: describe '#something' do context 'with lots of required arguments' do it 'should work' do subject.something(:foo => 'foo...

Though nowhere to be found in the official docs, this works just fine. describe Facebook::Post do it_behaves_like...

In a nutshell: Capybara's find will not work properly on nodes from a list. Don't find on elements...

This works in modern RSpecs (RSpec >= 2.x) and Cucumbers: rspec spec/models/node_spec.rb:294:322 cucumber features/nodes.feature:543:563:579

Cucumber factory supports polymorphic associations out of the box. Just keep in mind that you need to use named associations...

When you are using the #selector_for helper in Cucumber steps, as e.g. Spreewald does, the following snippet will save...

Cucumber's docstrings let you add long strings to a step like this: # foo.feature Given this text: """ First line

I've pushed an update to Cucumber factory that simplifies working with FactoryGirl factories. Say you define a factory with...

Sometimes you need complex expectations on method arguments like this SomeApi.should_receive(:find).with(:query => '*foo*', :sort => 'timestamp ASC', :limit...

Spreewald 1.4.0 comes with this step: When I click on the element ".sidebar" We recommend to define a selector_for...

github.com

Weighttp is threaded and might exhaust resources of an application better than ApacheBench or httperf. You need libev installed.

For Capybara, use this step: Then /^"([^"]*)" should be a disabled option for "([^"]*)"(?: within "([^\"]*)")?$/ do |value, field, selector| with_scope(selector...

github.com

If you have FactoryGirl traits like this: factory :movie do title 'Sunshine' year 2007 trait :vintage do year 1951

tl;dr You can use attribute? as shorthanded version of attribute.present?, except for numeric attributes and associations. Technical Details

...one-sync once. It should ask you for some encfs settings; just press ENTER. Test it by putting some file into ~/sync. An encrypted version of your file should show...

makandra dev

With Rspec you can mock objects or functions, for example like this: expect(my_object).to receive(:my_function).and...

makandra dev
github.com

...other examples after print out the failure. I haven't tried it with parallel_tests...