This is really an "opinion" question, so I'm not sure it's going to survive, but i think this is a reasonable approach and I'm not aware of any other alternatives. If the -e
command line option took a regex as an argument, you could perhaps rely on that, but it takes a string and I believe requires a complete match.
using tags in rspec for breaking down agile development
-
29-06-2022 - |
Question
Our specs are taking about 15 minutes to run and am looking for some advice (and really a sanity check for whether our sol'n makes sense). I'd like to create a system where isolated tests can be run separate from the whole suite and also match up to a task from our task list. I've proposed that we tag each of our specs like this:
describe 'task048: call to test mobile api', task048: true do
render_views
it 'will test ...'
so that we could run:
rspec --tag task048
to just check a single spec and then run it against our CI server at a later point. It seems to be working well and thinking of doing this for our small team. Does this seem like a reasonable solution? I have limited experience in rspec so just want to be sure I'm not missing a better way.
thx
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow