[rspec-devel] [ rspec-Bugs-10553 ] 'rake spec' task modifies spec files

noreply at rubyforge.org noreply at rubyforge.org
Thu May 3 09:48:26 EDT 2007


Bugs item #10553, was opened at 2007-05-03 08:45
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=10553&group_id=797

Category: rails plugin
Group: None
Status: Open
>Resolution: Rejected
Priority: 3
Submitted By: Chris Hoffman (hoffman_c)
Assigned to: Nobody (None)
Summary: 'rake spec' task modifies spec files

Initial Comment:
Hello,

It appears as though, when I run 'rake spec' on a rails project with specs, all of the spec files are modified.  Though there is no content changed in these files, the modification date is changed.  In itself this is but an annoyance, but when working with sufficiently sophisticated editing software, it detects that a file has been modified since being opened.  Thus, I am getting error messages constantly.

I assume that there is just a bit of code that now opens the files with write access, even though it is just reading them.

I am on the HEAD of svn trunk, by the way.  Thanks.

-Chris

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

>Comment By: Chris Hoffman (hoffman_c)
Date: 2007-05-03 09:48

Message:
Well, I just removed the HEAD externals and got the 0.9.2
release, and things seem to be working just as they should.
 I will remove this ticket since you guys can't reproduce
the bug on HEAD.

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-05-03 09:02

Message:
Also - the usual info (OS, ruby version, specific revision number of rspec as HEAD changes from minute to minute, rails/non-rails, rails version if rails, etc) would be helpful.

Thanks

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

Comment By: David Chelimsky (dchelimsky)
Date: 2007-05-03 09:00

Message:
What a puzzle. I've looked through the code (I'm at rev 1903) and I don't see where this could be happening. There are a number of File.opens that read, but the few that use 'w' actually need it to do their work, and they only operate on a few files (that are used by rspec - not files you write as an rspec user).

I also looked for FileUtils.touch, of which there are a couple of cases in RSpec's own specs, but not in the code you are running.

Other suggestions as to where to look?

Also, I just opened up a spec file in vim, ran the specs with rcov enabled, edited the file and saved it w/ no trouble. So I can't reproduce this myself. Can you give us a step by step means to reproduce the bug?

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

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


More information about the rspec-devel mailing list