Issue #3994 has been updated by Matt Robinson.

Status changed from Needs design decision to Ready for Testing
Branch set to 
http://github.com/mmrobins/puppet/tree/bug/0.25.x/3994-rename_spec_files

The dev list is okay with this change, so I'll mark this ready for testing.  
I've verified that this change doesn't cause any test breakages, but I'm not 
sure if we have a process for people besides the original coder running tests.  

Rather than cherry picking this into master for 0.26.x from 0.25.x (which where 
I based the branch off) it may be better to just do the rename there 
seperately.  From the spec/unit directory run:

find . -name '*.rb' | xargs rename 's/(.*)\.rb/$1_spec.rb/'

Can verify afterwards that no files already had _spec at the end:

find . -name '*spec_spec.rb'
----------------------------------------
Bug #3994: Rename specs to have _spec.rb at the end
http://projects.puppetlabs.com/issues/3994

Author: Matt Robinson
Status: Ready for Testing
Priority: Low
Assigned to: Matt Robinson
Category: testing
Target version: 
Affected version: 0.25.5
Keywords: 
Branch: http://github.com/mmrobins/puppet/tree/bug/0.25.x/3994-rename_spec_files


I'd like to rename the spec files to have _spec.rb at the end.  Most projects 
I've seen do this and I never really thought why, but I ran into a case today 
where the naming of the spec file messes up the spec run if you're in the same 
directory as the spec.

in a puppet checkout:
cd spec/unit/indirector
spec rest.rb # spec/../lib/puppet/rails/param_value.rb:3: uninitialized 
constant ActiveRecord::Base (NameError)

This is happening because there's a file in the same directory called 
active_record.rb (which is a spec for lib/puppet/indirector/rest.rb) that ends 
up being loaded instead of Rail's active_record.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to