Sha256: 2c06b1554572aef86beb3801b905196ed013264776a0f48ddccfff2d84e2d20c

Contents?: true

Size: 320 Bytes

Versions: 7

Compression:

Stored size: 320 Bytes

Contents

require "spec_helper"

module Nasty
  describe ExposeBinding do
    it "exposes an objects private binding" do
      item = Object.new.instance_eval do
        @message = "secret"
        self
      end
      item.extend(Nasty::ExposeBinding)
      eval("@message", item.get_binder).should == "secret"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nasty-0.0.1395464273 spec/unit/expose_binding_spec.rb
nasty-0.0.1388168019 spec/unit/expose_binding_spec.rb
nasty-0.0.1388167257 spec/unit/expose_binding_spec.rb
nasty-0.0.1388166944 spec/unit/expose_binding_spec.rb
nasty-0.0.1388166636 spec/unit/expose_binding_spec.rb
nasty-0.0.1388165564 spec/unit/expose_binding_spec.rb
nasty-0.0.1388164945 spec/unit/expose_binding_spec.rb