File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 it "returns the birth time for the named file as a Time object" do
1414 File . birthtime ( @file )
1515 File . birthtime ( @file ) . should be_kind_of ( Time )
16+ rescue NotImplementedError => e
17+ skip e . message if e . message . start_with? ( "birthtime() function" )
1618 end
1719
1820 it "accepts an object that has a #to_path method" do
1921 File . birthtime ( mock_to_path ( @file ) )
22+ rescue NotImplementedError => e
23+ skip e . message if e . message . start_with? ( "birthtime() function" )
2024 end
2125
2226 it "raises an Errno::ENOENT exception if the file is not found" do
2327 -> { File . birthtime ( 'bogus' ) } . should raise_error ( Errno ::ENOENT )
28+ rescue NotImplementedError => e
29+ skip e . message if e . message . start_with? ( "birthtime() function" )
2430 end
2531 end
2632
3743 it "returns the birth time for self" do
3844 @file . birthtime
3945 @file . birthtime . should be_kind_of ( Time )
46+ rescue NotImplementedError => e
47+ skip e . message if e . message . start_with? ( "birthtime() function" )
4048 end
4149 end
42-
43- # TODO: depends on Linux kernel version
4450end
Original file line number Diff line number Diff line change 1717 st = File . stat ( @file )
1818 st . birthtime . should be_kind_of ( Time )
1919 st . birthtime . should <= Time . now
20+ rescue NotImplementedError => e
21+ skip e . message if e . message . start_with? ( "birthtime() function" )
2022 end
2123 end
2224end
You can’t perform that action at this time.
0 commit comments