mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Use platform_is guard
				
					
				
			This commit is contained in:
		
							parent
							
								
									18f7d3c9a6
								
							
						
					
					
						commit
						ca0f68260e
					
				
				
				Notes:
				
					git
				
				2020-04-03 10:37:04 +09:00 
				
			
			
			
		
		
					 4 changed files with 4 additions and 4 deletions
				
			
		|  | @ -15,7 +15,7 @@ describe "File.atime" do | ||||||
|     File.atime(@file).should be_kind_of(Time) |     File.atime(@file).should be_kind_of(Time) | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   guard -> { platform_is :linux or platform_is :windows } do |   platform_is :linux, :windows do | ||||||
|     ## NOTE also that some Linux systems disable atime (e.g. via mount params) for better filesystem speed. |     ## NOTE also that some Linux systems disable atime (e.g. via mount params) for better filesystem speed. | ||||||
|     it "returns the last access time for the named file with microseconds" do |     it "returns the last access time for the named file with microseconds" do | ||||||
|       supports_subseconds = Integer(`stat -c%x '#{__FILE__}'`[/\.(\d+)/, 1], 10) |       supports_subseconds = Integer(`stat -c%x '#{__FILE__}'`[/\.(\d+)/, 1], 10) | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ describe "File.ctime" do | ||||||
|     File.ctime(@file).should be_kind_of(Time) |     File.ctime(@file).should be_kind_of(Time) | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   guard -> { platform_is :linux or platform_is :windows } do |   platform_is :linux, :windows do | ||||||
|     it "returns the change time for the named file (the time at which directory information about the file was changed, not the file itself) with microseconds." do |     it "returns the change time for the named file (the time at which directory information about the file was changed, not the file itself) with microseconds." do | ||||||
|       supports_subseconds = Integer(`stat -c%z '#{__FILE__}'`[/\.(\d+)/, 1], 10) |       supports_subseconds = Integer(`stat -c%z '#{__FILE__}'`[/\.(\d+)/, 1], 10) | ||||||
|       if supports_subseconds != 0 |       if supports_subseconds != 0 | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ describe "File.mtime" do | ||||||
|     File.mtime(@filename).should be_close(@mtime, TIME_TOLERANCE) |     File.mtime(@filename).should be_close(@mtime, TIME_TOLERANCE) | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   guard -> { platform_is :linux or platform_is :windows } do |   platform_is :linux, :windows do | ||||||
|     it "returns the modification Time of the file with microseconds" do |     it "returns the modification Time of the file with microseconds" do | ||||||
|       supports_subseconds = Integer(`stat -c%y '#{__FILE__}'`[/\.(\d+)/, 1], 10) |       supports_subseconds = Integer(`stat -c%y '#{__FILE__}'`[/\.(\d+)/, 1], 10) | ||||||
|       if supports_subseconds != 0 |       if supports_subseconds != 0 | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ require_relative '../../spec_helper' | ||||||
| describe "File.utime" do | describe "File.utime" do | ||||||
| 
 | 
 | ||||||
|   before :all do |   before :all do | ||||||
|     @time_is_float = /mswin|mingw/ =~ RUBY_PLATFORM |     @time_is_float = platform_is :windows | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   before :each do |   before :each do | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nobuyoshi Nakada
						Nobuyoshi Nakada