Created
          December 14, 2010 09:47 
        
      - 
      
- 
        Save ukstudio/740201 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # coding: utf-8 | |
| require 'rspec' | |
| describe Array do | |
| subject { [] } | |
| it { should 空であること } | |
| it { should 配列であること } | |
| end | |
| RSpec::Matchers.define :空であること do | |
| match {|obj| obj.empty? } | |
| end | |
| RSpec::Matchers.define :配列であること do | |
| match {|obj| obj.instance_of? Array } | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment