Changeset 1222
- Timestamp:
- 01/08/08 23:50:09 (9 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
r1218 r1222 17 17 18 18 def svn_revision_from_file 19 # This block should maybe be its own method 20 unless File.file? svn_revision_file_path 19 begin 21 20 File.open svn_revision_file_path, 'w' do |f| 22 21 f.print svn_revision 23 22 end 23 # catch permissions error when packaged as gem 24 rescue Errno::EACCES 24 25 end 25 26 trunk/spec/merb/version_spec.rb
r1221 r1222 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 raise permissions error' do 16 File.should_receive(:open).and_raise(Errno::EACCES) 17 Merb.svn_revision_from_file.should_not raise_error(Errno::EACCES) 13 18 end 14 19
