18 April 2014

The Ruby Reflector


Debian GNU/Linux

  Source Favicon
By Lucas Mazza of Plataformatec Blog 9 days ago.

A/B Testing different partials based on the user cookies.

API versioning for your Jbuilder templates.

Maintaining current and redesigned views for the same controller.

Authorization aware views, like users/index.html+admin.erb or products/show.html+guest.erb .

In the end, Variants are just a way for you to have more control over how your views will be used by the app, helping you to remove boilerplate logic from your code and letting the framework handle it through a more elegant …

blog.plataformatec.com.br Read
  Source Favicon

…first. This is a simple example, but by following this process, we can conquer any sized programming task. Writing the tests first will also help us write testable code and help us keep our methods small.

What's next?

If you found this useful, you might also enjoy:

End-to-End Testing with RSpec Integration Tests and Capybara

Spy vs Spy

Test Driven Development: By Example

robots.thoughtbot.com Read
  Source Favicon

Percona is glad to announce the release of Percona XtraBackup 2.2.1-alpha1 on March 28th 2014. Downloads are available from our download site here . This ALPHA release, will be available in our Debian experimental and CentOS testing repositories.

This is an ALPHA quality release and it is not intended for production. If you want a high quality, Generally Available release, the current Stable version should be used ( Percona XtraBackup 2.1.8 in the 2.1 series at the time of writing).

mysqlperformanceblog.com Read
  Source Favicon

…Percona Toolkit UDFs and HandlerSocket were missing from Debian/ Ubuntu packages, this regression was introduced in Percona Server 5.5.36-34.0 . Bugs fixed # 1296416 and # 1294216 .

Percona Server installer will create the symlinks from libmysqlclient to libperconaserverclient during the installation on CentOS . This was implemented in order to provide the backwards compatibility after the libmysqlclient library has been renamed …

mysqlperformanceblog.com Read
  Source Favicon
By Julian Dunn of Chef Blog 1 month ago.

Testing Your Libraries

Of course, you should test libraries as well. We're writing pure Ruby now, so we'll be using RSpec. The test code is too long to reproduce inline so here's a link to it .

The topic of testing libraries could probably merit a whole other blog post, so I won't delve into the details here. There are just a couple of things to point out about my test code:

We'll need to mock a dummy class and include our helper, just like …

opscode.com Read
  Source Favicon

Testing in General

We found Ember to be very easy to test in general. Most things break down to Ember.Object and it was easy to grab a controller in a test and verify that a property works as expected. Because we wanted to use Mocha with Chai BDD matchers instead of QUnit , the initial test setup was a bit complex but after using Konacha with a Mocha adapter , it was smooth sailing. The extra setup time for Mocha over QUnit was definitely …

robots.thoughtbot.com Read
  Source Favicon

Testing the Standard Model at Low Energies

Testing the Standard Model at Low Energies -- Professor Ron Guy ( Hebrew University)

From: UCBerkeleyEvents

Views: 0

0 ratings Time: 23:08 More in Education

youtube.com Read
  Source Favicon
By Lucas Welch of Chef Blog 2 months ago.

Testing Your Automation Code

Introduction to Kanban for Operations & DevOps

Awesome Postmortems

Git and Github Foundations

Intermediate and Advanced Git and Github Tips and Tricks

Ruby for Chefs

For all the details on # ChefConf 2014 workshops and trainings, please go here .

Also on April 15, New Context will be hosting the annual # ChefConf Hack Day. More information can be found here .

Chef Community Growth Surges, Transforming…

opscode.com Read
  Source Favicon
By Shannon Behrens of JJinuxLand 3 months ago.

Testing a function that raises an exception

Add the following to main.py:

def raise_an_exception():

raise ValueError("This is a ValueError")

And the following to test_main.py:

def test_raise_an_exception():

with assert_raises(ValueError) as context:


assert_equal(str(context.exception), "This is a ValueError")

Your tests should still be passing.


Sometimes there are parts of your code that are difficult to test …

jjinux.blogspot.com Read
  Source Favicon
By sarah of the evolving ultrasaurus 3 months ago.

Bryan Helnkamp ‘s WebRAT, so named for Ruby Acceptance Testing, which instigated the rodent naming theme) Capybara is wonderful with its support for many "drivers" which allow for a consistent API across different solutions that offer different levels of browser support, with different performance characteristics.

Capybara:: Webkit

Thoughtbot kindly created the capybara-webkit gem a few years ago, which I've found to be more reliable and performant …

ultrasaurus.com Read