Tag Archives: ruby

Uploading CSS files using “Shrine” gem

I have recently switched from carrierwave to shrine in my Rails app and i thought i follow the advice of Alan Richardson, saying when you learn something new, irregardless of how trivial it might seem to you, share it and … Continue reading

Posted in Programming | Tagged , , , , , , | Leave a comment

type into a textfield with keypress event disabled

A colleague asked me how to automate a disabled text-box which has a calendar attached to it. The customer has specified that they want keyboard entries disabled for this text-field, hence every user of the website has to use the … Continue reading

Posted in Software Testing | Tagged , , , , , , , | 2 Comments

Writing acceptance test before development or implementation starts

In my the few years, where i have pushed for testers developers to write acceptance test before development or implementation commences, I’ve had testers come up to me say its difficult to achieve this when you dont know what the … Continue reading

Posted in Agile Delivery | Tagged , , , , , , , , | 2 Comments

Rails3 ‘link_to’ displays literal HTML on front end

>In the last month, I have been working on a rails3 app and I ran across this interesting problem where I need to create a href link to a another page from my current page. In my view i have … Continue reading

Posted in Software Testing | Tagged , , , | Leave a comment

Installing mysql on snow leopard

>I have always struggled with install mysql on my snow leopard, as a result i have decided to keep a link on this blog for this: http://www.icoretech.org/2009/08/install-mysql-and-mysql-ruby-gem-on-snow-leopard-64-bit/ Hopefully that link would be up for a very long time and i … Continue reading

Posted in Software Testing | Tagged , , , | Leave a comment

>Watir: Search for elements on page using multiple attributes

>I ran into a situation today where i wanted to scan through a page and return a table based on the table matching 3 attributes Before: browser.tables.find do |table| table.class_name == ‘my_class_name’ and table.cell(:class, ‘class_1_name’).text == ‘some_text_1’ and table.cell(:class, ‘class_2_name’).text … Continue reading

Posted in Software Testing | Tagged , , | Leave a comment

>Implement ‘Select column_name from table_name where condition’ in Active Record

>I need an array from the data contained in a particular database column based on a condition, so i get the array of active record rows: array_of_rows = TableName.find(:all, :conditions => {:column_name => [‘col_data1′,’col_data2’]}) Then use the array map! function … Continue reading

Posted in Software Testing | Tagged , , | Leave a comment