httpbin.org

Some dozen generic API endpoints you can use to test how your HTTP client deals with various responses, e.g. a slow connection many redirects compressed data I found this useful...

Note that you need to write all selectors in lowercase letters in your tests. Capybara talks HTML, after all, and in HTML tags and attributes are case-insensitive (as...

api.jquery.com

...of matched elements to those that match the selector or pass the function's test. jQuery has a select method, but it has nothing to do with navigating the DOM...

To reverse lookup a fixture by its table name and id, use the following approach on ActiveRecord::FixtureSet: table = 'users...

github.com

...t tried it. Please update this card if you find out. What I did test successfully was the workaround below. Workaround In Rails 4 you can wrap the output of...

danhixon.github.com

...above when running cucumber, just execute... rm rerun.txt ...in the Rails directory. Or run... tests ...from the geordi gem. This will do the work for you automatically...

stackoverflow.com

...message may occur when rspec gets loaded by rake, e.g. when you migrate the test database. NoMethodError: undefined method 'last_comment' for # Rake 11 removes a method that rspec-core...

You can use the Youtube API to get data from youtube. Here are some resources and some things that are...

...if you have an unparsable mail aliases file you will get this: # puppet agent --test --trace --noop Info: Using configured environment 'production' Info: Retrieving pluginfacts Info: Retrieving plugin

...If you have more than one recording device, find the correct one. Make a test call to a colleague that can tell you if it's too loud or too...

...You can force Capybara to match exactly what you are typing (which makes your tests better anyways) with match: :prefer_exact: name = 'Name' value = 'Bettertest Cucumberbatch' fill_in(field, with...

...This broke during deployment while Capistrano tries to run bundle --deployment --quiet --without development test. On our development machines bundle install run successfully. Fix this by making sure both sides...

phrogz.net

...positioning, width/heigth, or similar. Every browser has its own caveats and you can not test them all. Generally speaking: Use the html tag to define your page's default background...

...committed fix that is not yet in the stable repository. You can enable the testing sources (natty-proposed) and update your packages to get the fix. You will also receive...

...lots of other code in testing, so hold on to something. This can be avoided by restricting it to the compiz package (I did not test this). Warning: Your system...

yarn add rails-erb-loader Add this to your config/webpacker/environment.js: environment.loaders.prepend('erb', { test: /\.erb$/, enforce: 'pre', use: [{ loader: 'rails-erb-loader', }] }) Start using erb. For example, in a...

...you could open a new tab via window.open when using execute_script in Selenium tests. It no longer works in Chrome (will show a "popup blocked" notification). This is because...

So I checked the /var/lib/dpkg/info/varnish.postrm for exit 78 and found the following: [...] if test -e /var/lib/varnish; then rm -r /var/lib/varnish > /dev/null 2>&1 || exit 78 fi [...] This directory couldn...

If you open a pop-up window [1] in your Selenium tests and you want to close it, you can do this: # Find our target window handle = page.driver.find_window("My...

In RSpec 2 shared_examples_for can have parameters. You can simply hand over arguments from it_behaves...

FactoryBot.define do factory :parent do transient do child_name nil child_allowed_to_drive false end child do association(:child...

...account, users will get a BCrypt::Errors::InvalidHash when trying to sign in. Your tests will not notice this, since they create new users for each scenario.

makandra dev
github.com

...If you want to open XLSX spreadsheets (for example to confirm your output in tests), you can use roo. To easily dump Rails records to XLSX, there is also axlsx...

If a controller action responds to other formats than HTML (XML, PDF, Excel, JSON, ...), you can reach that code in...

If you get an error like this for a puppet mount: $ > puppet agent --test Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for example.makandra.de Info: Applying...