When you run the rspec command without specifying a particular file or group of files that contains your specs, it assumes that your specs live in the spec directory. (You can override this default with the –default-path option, although I’m not sure why you’d want to.)

My Rails app has a model called Account, and I’ve been tasked with implementing an account search feature. Users type their search query into a form and see a list of accounts which match that query. The problem is that exactly what constitutes a ‘match’ is complicated. Each Account has multiple attributes (email, first_name etc.) which could match the search query, and even some associated models (e.g. an account has_many :phone_numbers) whose attributes should be searchable too.