See cucumber scenarios by tag – solution

I was complaining the other day that I couldn’t find a little utility which would allow me to see my cucumber scenarios by tag so I wrote one.

I’m just about to put it up on GitHub and I’ll package it as a gem as well then add the link to it from this site.

Basically, it’s as simple as providing the directory for your feature files; a filename for the output and the tagname that you want to search for:

dir = '/Users/user/GitHub/my-calabash/features/'
filename = 'tag_info_out.html'
tagname = '@manual'
generate_report(dir, filename, tagname)

and then it presents the results in an html file:

report

Ok- so the formatting leaves a lot to be desired and I will work on improving that, but it’s so handy to be able to just input a tagname and then get a report of all the scenarios that would be called using that tagname.

The next incarnation will produce a report for multiple / concatenated tagnames.

Advertisements

Cannot install Ruby Gem – certificate error

I just encountered a problem trying to install first the rails gem and then the watir gem.

I executed:

$ gem install rails

it failed with an OpenSSL error, a bit later I tried to install watir using:

$ gem install watir

I was surprised to see that it also failed with

# Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)

I wondered it might have something to with the fact that I am using rvm to manage my ruby environments, it turns out that it does indeed. It seems that the certificates in rvm must be updated manually every so often.

If you check the status of the certificates in rvm by running:

$ rvm osx-ssl-certs status all

you will probably see

# Certificates for /etc/openssl/cert.pem: Old.

to update them, run:

$ rvm osx-ssl-certs update all

(Note – you may need to enter your password.)

Hey presto, your problem should be resolved!