Created
          February 27, 2012 09:59 
        
      - 
      
- 
        Save ukstudio/1922869 to your computer and use it in GitHub Desktop. 
    rspec
  
        
  
    
      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
    
  
  
    
  | describe Fixnum do | |
| subject { [1,2,3,4] } | |
| specify { subject.all?{|v| v==1} } | |
| it { should_not be_all{|v| v==1 }} | |
| it { should be_any{|v| v==1 } } | |
| it { should be_any(&lambda{|v| v==1 }) } | |
| end | |
| class Foo | |
| def active? | |
| true | |
| end | |
| end | |
| class Bar | |
| def active? | |
| false | |
| end | |
| end | |
| describe Foo do | |
| subject { [Foo.new,Bar.new] } | |
| it { should be_any(&:active?) } | |
| it { should_not be_all(&:active?) } | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment