gnecula / bond

Spy-based testing library.
http://necula01.github.io/bond/
Other
7 stars 3 forks source link

[rbond] RSpec doesn't really have the concept of 'test name' #6

Closed xkrogen closed 8 years ago

xkrogen commented 8 years ago

RSpec doesn't really have the concept of a test name. It refers to specific cases using a description, e.g. "Bond does something useful". What should we use as the test name, then? This is especially tricky since we're currently using the test name as the file name for the observations. We can strip out characters from the description of the test that aren't filename-friendly, maybe replace spaces with underscores or something, and use that? Or we can force users to specify a test name. Not sure what's best here.

gnecula commented 8 years ago

We always have the option to specify a test name. I think it is not too bad to replace most non-word chars with underscore. They will be long file names, but I think it should be Ok.

xkrogen commented 8 years ago

Yeah, I agree. Those files aren't really meant for humans to look at them anyway. I'll go ahead with that.

gnecula commented 8 years ago

Actually I do look at the observations files quite often. They are kind of a log of a test, sometimes if I want to see what a test is doing, I can see it from the file, especially if I know that all the "important" things are spied on.

xkrogen commented 8 years ago

Yeah, true. Still shouldn't be an issue - if you end up being annoyed at the long names you can always specify a shorter one.