Sha256: 7fea0d4fe686678cfeebbe0411dd5f51e90bb414c36bf052431018caab0d703c

Contents?: true

Size: 429 Bytes

Versions: 5

Compression:

Stored size: 429 Bytes

Contents

describe Musterb::InstanceVariableExtractor do
  class TestClass
    def initialize
      @foo = "bar"
    end
  end

  it "reads instance variables" do
    Musterb::InstanceVariableExtractor.new(TestClass.new, nil)["foo"].should eq "bar"    
  end

  it "delegates to the parent if it's not found" do
    Musterb::InstanceVariableExtractor.new(TestClass.new, Musterb::ObjectExtractor.new(2, nil))["to_s"].should eq "2"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
musterb-1.0.1 spec/musterb/instance_variable_extractor_spec.rb
musterb-1.0.0 spec/musterb/instance_variable_extractor_spec.rb
musterb-0.2.0 spec/musterb/instance_variable_extractor_spec.rb
musterb-0.1.2 spec/musterb/instance_variable_extractor_spec.rb
musterb-0.1.1 spec/musterb/instance_variable_extractor_spec.rb