Sha256: 7bb1e441b0ecf44790588df4b7768b5db9115951bf228f91047affb0c01683c2

Contents?: true

Size: 558 Bytes

Versions: 4

Compression:

Stored size: 558 Bytes

Contents

# -*- encoding: utf-8 -*-

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

require 'pmp/links'


describe PMP::Links do

  before(:each) {
    @parent = Minitest::Mock.new    
    @links = PMP::Links.new(@parent)
  }

  it "can create a new links obj" do
    @links.wont_be_nil
  end

  it "can access _parent" do
    @links.parent = {}
    @links.parent.wont_be_nil
  end

  it "can have a link assigned" do
    link = {}
    @parent.expect(:foo=, link, Array(Object))
    @links['foo'] = link
    @links['foo'].must_equal link
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pmp-0.1.3 spec/links_spec.rb
pmp-0.1.2 spec/links_spec.rb
pmp-0.1.1 spec/links_spec.rb
pmp-0.1.0 spec/links_spec.rb