Forum: Ruby Parameterising RSpec tests

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
David M. (Guest)
on 2008-10-10 10:40
(Received via mailing list)
Hello everyone,

I'm trying to work out how to use RSpec to bundle up some existing
test cases (created with a tool that is so nasty it defies
description).  For reasons that I won't go into, I'm stuck with using
the test cases that have been generated with this (non-Ruby) tool, but
I've managed to wrap the execution of individual test cases in a Ruby
class that makes them somewhat easier to work with:

class Test
    def execute_test(test_id)

    def test_passed?

All this works OK now.

What I'd like to have is something like:

describe 'The shakeout test suite' do
    it 'should complete test case 47 successfully'
    it 'should complete test case 173 successfully'
    it 'should complete test case 957 successfully'

then have

describe 'should complete test case #{some_number} successfully' do
   m =

Is there some elegant way to parameterise RSpec test "describes" in this


Dave M.
This topic is locked and can not be replied to.