[rspec-users] beginner questions: parametrize tests and disable tests (skippy?)

nathanvda nathanvda at gmail.com
Mon Jul 26 09:52:53 EDT 2010

Hi there,

i have two very specific questions. I am writing an application to
send sms-es. Now i would like to be able, somehow, to disable the part
of my tests that actually sends the sms-es.
My code is tested, but to actually test sending the sms-es, i need to
test the configuration. So it is needed to test that too, but not as
frequently. E.g. our cruisecontrol would need to do it only once per
day or per week, but not every time somebody checks in.

For test::unit there exists a solution: http://github.com/jm/skippy
Is there a similar solution for Rspec?
Or how do you guys solve this?

Secondly i have a small look-up table, and i want to check that my
function gives the correct result.

I would like something like the commented part, because if one lookup-
translation would fail, we get an appropriate message:

#        it "should translate #tr[0]} to success" do
#          result = translate_status(tr[0])
#          result.should == tr[1]
#        end
#      end

      it "should translate received statuses" do
tr[0]).should == tr[1]

Is that possible? Or what is the advised way to handle/test something
like that?

More information about the rspec-users mailing list