mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Update to ruby/spec@7289ea3
This commit is contained in:
		
							parent
							
								
									da5a128991
								
							
						
					
					
						commit
						7f82c8cd47
					
				
					 2 changed files with 16 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
require_relative '../../spec_helper'
 | 
			
		||||
 | 
			
		||||
describe "File.lchmod" do
 | 
			
		||||
  guard -> { File.respond_to?(:lchmod) } do
 | 
			
		||||
  platform_is_not :linux, :windows, :openbsd, :solaris, :aix do
 | 
			
		||||
    before :each do
 | 
			
		||||
      @fname = tmp('file_chmod_test')
 | 
			
		||||
      @lname = @fname + '.lnk'
 | 
			
		||||
| 
						 | 
				
			
			@ -30,9 +30,21 @@ describe "File.lchmod" do
 | 
			
		|||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  guard_not -> { File.respond_to?(:lchmod) } do
 | 
			
		||||
  platform_is :openbsd, :aix do
 | 
			
		||||
    it "returns false from #respond_to?" do
 | 
			
		||||
      File.respond_to?(:lchmod).should be_false
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    it "raises a NotImplementedError when called" do
 | 
			
		||||
      -> { File.lchmod 0, "foo" }.should raise_error(NotImplementedError)
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  platform_is :linux do
 | 
			
		||||
    it "raises a NotImplementedError or Errno::ENOTSUP when called" do
 | 
			
		||||
      -> { File.lchmod 0, "foo" }.should raise_error(Exception) { |e|
 | 
			
		||||
        [NotImplementedError, Errno::ENOTSUP].should include(e.class)
 | 
			
		||||
      }
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,9 +1,8 @@
 | 
			
		|||
#ifndef RUBYSPEC_H
 | 
			
		||||
#define RUBYSPEC_H
 | 
			
		||||
 | 
			
		||||
/* Define convenience macros similar to the mspec guards to assist
 | 
			
		||||
 * with version incompatibilities.
 | 
			
		||||
 */
 | 
			
		||||
/* Define convenience macros similar to the mspec
 | 
			
		||||
 * guards to assist with version incompatibilities. */
 | 
			
		||||
 | 
			
		||||
#include <ruby.h>
 | 
			
		||||
#ifdef HAVE_RUBY_VERSION_H
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue