I’d like to do something like this: some_method.should_raise <any kind of exception, I don't care> How should I do this? some_method.should_raise exception … doesn’t work. 5 Answers 5
I have been googling for about 90 minutes now and still don’t have an answer to this. Where do I set default_url_options? I’ve already set it for config.action_mailer.default_url_options to...
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. What are the...
I often want to compare arrays and make sure that they contain the same elements, in any order. Is there a concise way to do this in RSpec? Here...
I want to be able to run a single spec file’s tests — for the one file I’m editing, for example. rake spec executes all the specs. My project...
I have the following file: /spec/controllers/groups_controller_spec.rb What command in terminal do I use to run just that spec and in what directory do I run the command? My gem...
I tend to use before blocks to set instance variables. I then use those variables across my examples. I recently came upon let(). According to RSpec docs, it is...