[rspec-users] RSpec-rails 1.2.2: autospec passes but "rake spec" fails
sfeley at gmail.com
Wed Mar 25 15:47:58 EDT 2009
On Wed, Mar 25, 2009 at 3:29 PM, Tadatoshi Takahashi
<lists at ruby-forum.com> wrote:
> It seems that autospec is run against test database and that "rake spec"
> is run against development database.
> How can I resolve this problem?
The first thing I'd check would be whether you have RAILS_ENV defined
in your .profile or .bashrc or wherever. RSpec used to always declare
the 'test' environment, but the latest version of spec_helper.rb
declares it conditionally:
ENV["RAILS_ENV"] ||= 'test'
It shouldn't be necessary to declare your environment as 'development'
in the shell, because it's usually the default. So if you have that
environment variable set somewhere, take it out.
Steve Eley (sfeley at gmail.com)
ESCAPE POD - The Science Fiction Podcast Magazine
More information about the rspec-users