Changeset 1218
- Timestamp:
- 01/08/08 20:07:44 (8 months ago)
- Files:
-
- trunk/lib/merb/version.rb (modified) (1 diff)
- trunk/spec/merb/version_spec.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/merb/version.rb
r1217 r1218 17 17 18 18 def svn_revision_from_file 19 File.open svn_revision_file_path, 'w' do |f| 20 f.print svn_revision 19 # This block should maybe be its own method 20 unless File.file? svn_revision_file_path 21 File.open svn_revision_file_path, 'w' do |f| 22 f.print svn_revision 23 end 21 24 end 22 25 trunk/spec/merb/version_spec.rb
r1217 r1218 11 11 Merb.svn_revision_from_file 12 12 File.file?(Merb.svn_revision_file_path).should == true 13 end 14 15 it 'should not try to create the file if it already exists' do 16 File.should_receive(:open).never 17 Merb.svn_revision_from_file 13 18 end 14 19
