Sha256: 8372ae8b191118ebdf4502ada5f7308d89738b4eea77bf80b0733e43413ca985

Contents?: true

Size: 471 Bytes

Versions: 6

Compression:

Stored size: 471 Bytes

Contents

require 'spec_helper'
require 'parameters/instance_param'

describe Parameters::InstanceParam do
  it "should read values from another object" do
    obj = Object.new
    param = described_class.new(obj,:x)

    obj.instance_variable_set(:"@x",5)
    param.value.should == 5
  end

  it "should write values to another object" do
    obj = Object.new
    param = described_class.new(obj,:x)

    param.value = 5
    obj.instance_variable_get(:"@x").should == 5
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
parameters-0.4.4 spec/instance_param_spec.rb
parameters-0.4.3 spec/instance_param_spec.rb
parameters-0.4.2 spec/instance_param_spec.rb
parameters-0.4.0 spec/instance_param_spec.rb
parameters-0.3.1 spec/instance_param_spec.rb
parameters-0.3.0 spec/instance_param_spec.rb