[rspec-users] RSpec-rails 1.2.2: autospec passes but "rake spec" fails
Matt Wynne
matt at mattwynne.net
Mon Mar 30 11:37:51 EDT 2009
On 30 Mar 2009, at 13:23, David Chelimsky wrote:
> On Mon, Mar 30, 2009 at 2:35 AM, Matt Wynne <matt at mattwynne.net>
> wrote:
>>
>> On 29 Mar 2009, at 20:18, Stephen Eley wrote:
>>
>>> # This line ensures that RSpec will run in the 'test' environment
>>> # regardless of defaults set by other tools. If you have reasons
>>> to run
>>> # specs in other environments, you can allow this value to be
>>> overridden
>>> # by changing the line to:
>>> #
>>> # ENV['RAILS_ENV'] ||= 'test'
>>
>>
>> Just to explain: I think it was me who asked for this, though the
>> change
>> wasn't in generated code, it was in a file in rspec-rails that gets
>> run when
>> you require 'spec/rails'. We use a 'features' environment for
>> running our
>> features (so we can run them in parallel with specs) and it was
>> causing some
>> weird behaviour as the constant was changing under our feet as the
>> features
>> (which use some rspec-rails matchers) were run.
>
> What was the code doing to make the rspec-rails matchers available?
require 'spec/rails'
> There's no reason you'd need to load 'spec/spec_helper.rb' to do that.
Maybe I'm getting two things mixed up, but I thought the change we
were talking about here was this commit: http://github.com/dchelimsky/rspec-rails/commit/d6af98c1ffd992d81723fba70f5da9fbbb9e0a58
I didn't realise that the generated spec/spec_helper.rb file was also
going something similar.
Matt Wynne
http://blog.mattwynne.net
http://www.songkick.com
More information about the rspec-users
mailing list