Sha256: 648dbe967e4b2928b614b280e232f5ffbaec78465f561f907e6a72a7dd0d1bdb

Contents?: true

Size: 274 Bytes

Versions: 12

Compression:

Stored size: 274 Bytes

Contents

require 'spec_helper'
describe :instance_eval do

  let(:bar){ lambda{10} }
  let(:foo) { Object.new }

  if RUBY_VERSION <= "1.9"
    subject{ foo.instance_eval(&bar) }
    it { should == 10 }
  else
    subject{ foo.instance_exec(&bar) }
    it { should == 10 }
  end

end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-core/assumptions/test_instance_eval.rb
alf-core-0.14.0 spec/unit/alf-core/assumptions/test_instance_eval.rb
alf-core-0.13.1 spec/unit/alf-core/assumptions/test_instance_eval.rb
alf-core-0.13.0 spec/unit/alf-core/assumptions/test_instance_eval.rb
alf-0.12.2 spec/unit/alf-core/assumptions/test_instance_eval.rb
alf-0.12.1 spec/unit/alf-core/assumptions/test_instance_eval.rb
alf-0.12.0 spec/unit/alf-core/assumptions/test_instance_eval.rb
alf-0.11.1 spec/unit/alf-core/assumptions/test_instance_eval.rb
alf-0.11.0 spec/unit/alf-core/assumptions/test_instance_eval.rb
alf-0.10.1 spec/unit/assumptions/test_instance_eval.rb
alf-0.10.0 spec/unit/assumptions/test_instance_eval.rb
alf-0.9.3 spec/unit/assumptions/test_instance_eval.rb