Note: We are talking about Machinist 1 here, Machinist 2 may have solved this or might require a different approach...

If you stub a method or set expectations with should_receive these stubbed methods may also yield blocks. This is...

sslscan is a nice tool to show details about TLS/SSL connections: ~> sslscan some-host-at.makandra.de Testing SSL server some-host-at.makandra.de on port 443 Supported Server Cipher(s): Failed SSLv3 256 bits ECDHE-RSA...

When refactoring a sequence of steps to a new, more descriptive step, you can use the steps method and Ruby...

Sometimes, you might have duplicate links on a page. Trying to click those links will by default cause Capybara to...

class Note does 'strip_carriage_returns', :prose, :code end Here is the test that goes with it: describe Note do describe 'before_validation' do it_should_run_callbacks...

When updating WebMock, be prepared that your specs may send real requests into the depths of the internet unless you...

Capybara does not play nice with sites that have some actions protected by SSL, some not. A popular way to...

validates_acceptance_of :terms only works if terms is set to a value. The validation is skipped silently when terms...

If rspec hangs with no output and you dont get a backtrace neither with --backtrace nor by just killing it...

If you're writing a spec for an application using Resque, you may need to work off queues manually without...

You can use record.send(:update_without_callbacks) or record.send(:create_without_callbacks) This can be used as a...

If you are trying to inspect timings in JavaScript, you can use console.time and console.timeEnd which will write to your...

makandracards.com

Chances are you're seeing the warning repeated a lot of times, maybe thousands of times. Here's how to...

Chrome allows you to throttle the Network and the CPU. Both settings are useful to measure the performance of you...

makandra dev
github.com

...local database server installations in batches. Derivative database names like foo_development and foo_test4 for foo are handled together with foo to allow for per-project whitelisting of database...

While RSpec 1 and 2 decided that specs inside spec/model are model specs, and those inside spec/features are feature specs...

Using this step definition you can check if any form field (text field, checkbox, etc) or button is disabled:

makandra dev

Use this snippet by Achu from Ask Ubuntu: ping hostname.tld | while read pong; do echo "$(date): $pong"; done

github.com

FactoryBot allows a :class option to its factory definitions, to set the class to construct. However, this option is not...

makandra dev

Spreewald now has a spreewald binary that lists all available steps, optionally filtering them. Example: $> spreewald # All Spreewald steps

Recent versions of the Faker gem retrieve their strings from your locale file (e.g. config/locale/de.yml). This leads to awesome errors...

makandra dev

RSpec::Matchers.define :be_naturally_sorted do match do |array| array == array.natural_sort end end See RSpec: Where to put custom...

blog.plataformatec.com.br

...version specially created for mobiles, such as the iPhone. This specific application was entirely tested with Capybara, Steak and Selenium Webdriver. Although the test suite wasn’t the fastest one...

...in the world, the web application was very well tested, and to guarantee that we would also be testing the mobile version, we would have to simulate an iPhone user...