[rspec-users] beginner questions: parametrize tests and disable tests (skippy?)
nathanvda at gmail.com
Mon Jul 26 09:52:53 EDT 2010
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:
# STATUS_EXPECTED_TRANSLATIONS.each |tr| do
# it "should translate #tr} to success" do
# result = translate_status(tr)
# result.should == tr
it "should translate received statuses" do
STATUS_EXPECTED_TRANSLATIONS.each do |tr|
tr).should == tr
Is that possible? Or what is the advised way to handle/test something
More information about the rspec-users