Silencing Your Staging Environment - The Hashrocket Blog

Posted Over 11 years ago by Henning Koch.
blog.hashrocket.com

Testing with real live production data does come with at least one catch. All those real live users in your production environment have real live email addresses that receive real...

How to change will_paginate's "per_page" in Cucumber features

Posted Almost 12 years ago by Arne Hartherz.

...gem will show a default of 30 records per page. If you want to test pagination in a Cucumber feature, you don't want to create 31 records just for...

Updated: Capybara: Check that a page element is hidden via CSS

Posted Almost 12 years ago by Henning Koch.
makandracards.com

...so it should be a drop-in replacement for all your projects. For Rack::Test the step no longer uses XPath so you should be able to understand it when...

How much should I refactor?

Posted Almost 12 years ago by Henning Koch.
robots.thoughtbot.com

...discovered new tools and techniques to separate and reuse logic, making code easier to test, understand, and maintain. Now that we’ve learned about all these new tools, when do...

Linux: How to add a task bar to VNC displays

Posted Almost 12 years ago by Arne Hartherz.

If you are using VNC to run Selenium tests, it may be hard to see what's going on since by default there is no list of open windows and...

VirtualBox host IP address and hostname

Posted About 12 years ago by Arne Hartherz.

...ll need it to access shared folders or your host's web server when testing pages in IE. Fun fact: You could also use vbox.srv – that's the corresponding hostname...

responsive.is

Posted About 12 years ago by Henning Koch.
responsive.is

Online tool to test how a site behaves in popular desktop, tablet and phone resolutions...

turn.js - The page flip effect for HTML5

Posted About 12 years ago by Henning Koch.
turnjs.com

...beautiful transition similar to real pages in a book or magazine for HTML5. I tested it successfully on Chrome, Firefox and IE9...

Use CSS "text-overflow" to truncate long texts

Posted About 12 years ago by Arne Hartherz.

...Note that this only works for single-line texts. If you want to truncate tests across multiple lines, use a JavaScript solution like Superclamp. There is also -webkit-line-clamp...

colszowka/simplecov - GitHub

Posted Over 12 years ago by Henning Koch.
github.com

...for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites. Note that rcov won't ever have support for Ruby 1.9, you're supposed...

New geordi script: migrate-all

Posted Over 12 years ago by Ulrich Berkmueller.
github.com

...the command geordi migrate to migrate your databases and to prepare them before running tests. The abbrevation geordi m works as well. It will run rake db:migrate if parallel...

...tests does not exist in your Gemfile Otherwise it runs b rake db:migrate and then executes b rake parallel:prepare if parallel_tests was found in your Gemfile...

RCov: The difference between "code coverage" and "total coverage"

Posted Over 12 years ago by Henning Koch.

Code coverage is the ratio of code lines kissed by a test vs. the total number of lines in your source files. This sounds meaningful, but isn't. Total coverage...

Embed Google Analytics code for some environments only

Posted Over 12 years ago.

...on your production site only. Otherwise it will spoil your statistics. To prevent this, test for the right environment and place the JS-code afterwards: - if Rails.env.production? :javascript

davetron5000/methadone - GitHub

Posted Over 12 years ago by Henning Koch.
github.com

...a nice way of processing parameter options, some utility classes and Cucumber steps for testing your CLI app...

Error "execution expired (Timeout::Error)" when using Selenium and Webmock

Posted Over 12 years ago by Tobias Kraze.

If you get the above error when running tests in bulk (but not individually), it's actually the fault of Webmock. Updating Webmock to version 1.7+ fixes this...

Cucumber.yml was found, but could not be parsed.

Posted Over 12 years ago.
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...

Rails logs are not flushed automatically (in Rake tasks)

Posted Over 12 years ago by Arne Hartherz.

...a production console. You often won't notice this because for the development and test environments auto_flushing is set to write after each line. On production environments the Rails...

Mailcatcher: An alternative to inaction_mailer

Posted Over 12 years ago by Thomas Eisenbarth.
github.com

...to 127.0.0.1:1025. Usually you want the following config in config/environments/development.rb and maybe in test.rb or cucumber.rb. config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :address => 'localhost', :port => 1025 } Now you can see...

Webrat doesn't follow redirect because it considers the url external

Posted Over 12 years ago by Dominik Schöler.

...URL, which can lead to errors when you have absolute URLs in your Cucumber tests. If you really need to use absolute URLs somewhere, say in an email you send...

Downgrade Firefox 6 to Firefox 5 on Ubuntu

Posted Over 12 years ago by Henning Koch.

Note that if you plan to downgrade Firefox because your Selenium tests broke after a Firefox upgrade, there is a better way that doesn't involve downgrading. Mozilla has stated...

Prevent your Firefox from auto-updating

Posted Over 12 years ago by Henning Koch.

Note that if you plan to freeze your Firefox versions because your Selenium tests break whenever Firefox updates, there is a better way that lets you keep an up-to...

Solarized

Posted Almost 13 years ago by Lexy.
ethanschoonover.com

...a refined set of hues based on fixed color wheel relationships. It has been tested extensively in real world use on color calibrated displays (as well as uncalibrated/intentionally miscalibrated displays...

Check whether a Paperclip attachment exists

Posted Almost 13 years ago by Henning Koch.

Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and thus always be true: - if user.photo.present? # always true

Web Operations 101 For Developers

Posted Almost 13 years ago by Lexy.
paperplanes.de

...build great web applications. In a pretty traditional world you write code, you write tests for it, you deploy, and you go home. Until now...