Sha256: dd3e2ac982f0a04efb5e6c1537181fbc64d263c5805a9be1069ecd9984e25664

Contents?: true

Size: 393 Bytes

Versions: 5

Compression:

Stored size: 393 Bytes

Contents

require 'spec_helper'

describe UnboundMethod do
  describe '#<' do
    let(:unbound_method){ String.instance_method(:index) }
    subject { unbound_method < "foobarbaz" }

    it { should be_a_kind_of Method }
    it('(unbound_method < obj).call(x) should be unbound_method.bind(obj).call(x)'){
      subject.call('bar').should == unbound_method.bind("foobarbaz").call("bar")
    }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lambda_driver-1.2.0 spec/unbound_method_spec.rb
lambda_driver-1.1.2 spec/unbound_method_spec.rb
lambda_driver-1.1.1 spec/unbound_method_spec.rb
lambda_driver-1.1.0 spec/unbound_method_spec.rb
lambda_driver-1.0.0 spec/unbound_method_spec.rb