Category Archives: Ruby

How to get the submodules of a ruby module

I needed to be able to find out what modules were defined inside a particular ruby module. Kinda like wanting to find out what child namespaces exist for a module. It’s probably more easily explained with an example. Given the … Continue reading

Posted in Example Code, Ruby | Tagged , | Leave a comment

How to connect to an Oracle database in IronRuby

After spending a few hours trying to connect to an oracle database in ironruby using various gems, I gave up. None of the gems out there would work, each for a different reason. It was time to write my own … Continue reading

Posted in Example Code, IronRuby, Making Life Easier, Ruby, Test Data, Tools | Tagged , , , , | Leave a comment

Testing redirects with ruby

Testing redirects from a web app is simple enough – make a request and check the response code making sure it’s a 301, 302 or whatever you’re expecting. The test you end up writing isn’t nice idiomatic ruby though. So, … Continue reading

Posted in Automated Testing, Example Code, Making Life Easier, RSpec, Ruby, Tools | Tagged , , , , , | Leave a comment

Remove junk from IronRuby cucumber output

When running cucumber tests under IronRuby, your output will be full of junk like the following: Feature: example feature Scenario: a scenario←[90m     # features\testoutput.feature:3←[0m ←[32mGiven some test setup←[90m  # features/step_definitions/output_steps.rb:1←[0m←[0m ←[32mWhen I do something←[90m    # features/step_definitions/output_steps.rb:5←[0m←[0m ←[32mThen something happens←[90m # … Continue reading

Posted in Automated Testing, IronRuby, Ruby, Tools, cucumber | Tagged , , , , | Leave a comment

TURN: test::unit reporting as it should have been…

TURN (“Test::Unit Reporter (New)”) aims to fix test::unit‘s default output. Instead of waiting until the end of a test run for failure details, Turn displays failures immediately. It looks promising… Bookmark to:

Posted in Automated Testing, Making Life Easier, Ruby, Test::Unit, Tools | Tagged , , , | Leave a comment

RQuery: A thin layer of JQuery over watir/selenium

So I went to a presentation today, run by Aidy Lewis and Josh Chisholm about Josh’s new RQuery project; here’s a braindump of what I remember. RQuery is not supposed to be a competitor to Selenium or Watir but builds … Continue reading

Posted in RQuery, Ruby, Tools, Uncategorized | Tagged , , , | 2 Comments

How to test a WPF app using IronRuby and White

…and you thought ruby was only good for web testing… So… having previously failed at getting ruby-based automated testing of WPF working, I attacked it from a different angle and succeeded! The difference is that this time I used IronRuby … Continue reading

Posted in Automated Testing, Example Code, IronRuby, Making Life Easier, Ruby, Test::Unit, Tools, white | Tagged , , , , , , , | 1 Comment