Sha256: f48d61e46f9e4dc29c54c60db980c1c494bd32883649dcf4f556f1eede6c1b1f

Contents?: true

Size: 578 Bytes

Versions: 3

Compression:

Stored size: 578 Bytes

Contents

require 'spec_helper'

describe Society::Node do

  let(:node) { Society::Node.new(
      name:     "Foo",
      address:  "./foo.rb",
      edges:    %w{Bar Bat}
    )
  }

  describe "#initialize" do
    it "assigns its name" do
      expect(node.name).to eq("Foo")
    end
    it "assigns its address" do
      expect(node.address).to eq("./foo.rb")
    end
    it "assigns its edges" do
      expect(node.edges).to eq(["Bar", "Bat"])
    end
  end

  describe "#edge_count" do
    it "returns a count of its edges" do
      expect(node.edge_count).to eq 2
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
society-0.13.2 spec/node_spec.rb
society-0.13.1 spec/node_spec.rb
society-0.13.0 spec/node_spec.rb