Sha256: 10289cc6a13281318b146d01978974d722fbbd1917d4d292e191a0667c5445db

Contents?: true

Size: 582 Bytes

Versions: 1

Compression:

Stored size: 582 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe 'Object#in?' do

  context 'when self is in the enumerable' do

    class Includes
      include Enumerable
      def include? *args
        true
      end
    end

    it 'returns true' do
      self.in?(Includes.new).should be_true
    end

  end

  context 'when self is not in the enumerable' do

    class DoesNotInclude
      include Enumerable
      def include? *args
        false
      end
    end

    it 'returns false' do
      self.in?(DoesNotInclude.new).should be_false
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gists-0.0.1 spec/in_spec.rb