aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/range/case_compare_spec.rb
blob: cada3b7cd5ef5c623989babf211c81ce90c54210 (plain)
1
2
3
4
5
6
7
8
9
10
11
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/cover_and_include', __FILE__)
require File.expand_path('../shared/cover', __FILE__)

describe "Range#===" do
  it "returns the result of calling #include? on self" do
    range = 0...10
    range.should_receive(:include?).with(2).and_return(:true)
    (range === 2).should == :true
  end
end