[rspec-devel] [ rspec-Bugs-13759 ] rails_rspec overwrites test mappings added in .autotest

noreply at rubyforge.org noreply at rubyforge.org
Mon Sep 17 18:30:04 EDT 2007


Bugs item #13759, was opened at 2007-09-07 19:12
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=13759&group_id=797

Category: Autotest
Group: v1.0 (example)
Status: Open
Resolution: None
Priority: 3
Submitted By: Geoffrey Wiseman (diathesis)
Assigned to: Nobody (None)
Summary: rails_rspec overwrites test mappings added in .autotest

Initial Comment:
If you add any any test mappings to .autotest, rails_rspec seems to trample these; that means any added directories (e.g. spec/acceptance) have to be added in rails_rspec, currently.

----------------------------------------------------------------------

>Comment By: Geoffrey Wiseman (diathesis)
Date: 2007-09-17 22:30

Message:
This is the bit I used:
module Autotest::AdditionalSpecs
  Autotest.add_hook :initialize do |at|
    at.test_mappings[ %r%^spec/acceptance/.*rb$% ] = proc do
|filename|
       return filename
    end
    
    puts "Mappings @ .autotest:"
    at.test_mappings.each do |k,v|
      puts "  #{k} => #{v}"
    end
  end
end

When I ran this, I could see it being added in .autotest,
but then when rails_rspec.rb ran, if I printed them out in
there, it would show that it had overwritten the original
values (as of the version i'm on, anyway).

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-09-16 08:04

Message:
Disregard that last message - wrong ticket.

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-09-16 08:02

Message:
I added the failing example to r2566 (set to pending). We got rid of the matcher when we added a default set of predicate matchers that included exist. We only added that to the ExampleApi, so we'd need to move the whole predicate matchers bit over to Spec::Matchers to get it to work. This is now on the radar but not first priority. If you can figure out how to do that, feel free to submit another patch. Otherwise, we'll get to it eventually.

----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-09-13 06:16

Message:
Please post your .autotest file so I can see this in action.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=13759&group_id=797


More information about the rspec-devel mailing list