How can I configure RSpec to run my model tests?

No matter what I do, the only tests that run with the rake test command are those in spec/requests. Naturally, I would like to run everything in the spec directory.

I thought getting the gem and installing RSpec would do it, but it seems with these testing libraries that the whole "convention over configuration" thing is turned on its head. There's a hell of a lot of configuration.

I simply want to run all of my tests. How can I do that?


What does your Rakefile look like? You may need to add the following:

require 'rspec/core/rake_task'

Also, check that your spec's filenames all end in _spec.rb.

Just this will do:

bundle exec rspec spec

This must be fired from root directory of application. Here spec is the directory.

Need Your Help

Good introductory text about GHC implementation?

optimization compiler-construction haskell ghc heap-memory

When programming in Haskell (and especially when solving Project Euler problems, where suboptimal solutions tend to stress the CPU or memory needs) I'm often puzzled why the program behaves the way...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.