Sha256: 396a454f3d3426e71057863ce4c929a3b2681cda719a81c8149639ce63ca7db6

Contents?: true

Size: 630 Bytes

Versions: 4

Compression:

Stored size: 630 Bytes

Contents

require 'spec_helper'

describe Miu::Node do
  def create_node_class
    Class.new do
      include Miu::Node
    end
  end

  describe 'description' do
    it do
      MiuNodeDescriptionTest = create_node_class
      expect(MiuNodeDescriptionTest.description).to eq MiuNodeDescriptionTest.name
    end

    it do
      c = create_node_class
      c.description 'my node'
      expect(c.description).to eq 'my node'
    end
  end

  describe 'register' do
    it do
      c = create_node_class
      block = proc {}
      Miu.should_receive(:register).with('test', c, {}, &block)
      c.register 'test', &block
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
miu-0.2.3 spec/miu/node_spec.rb
miu-0.2.2 spec/miu/node_spec.rb
miu-0.2.1 spec/miu/node_spec.rb
miu-0.2.0 spec/miu/node_spec.rb