Sha256: 5cdfd306115a3bf9055548d6aa4e5f7dc0342ce65aa8709baaffa8aa993af8b5

Contents?: true

Size: 690 Bytes

Versions: 4

Compression:

Stored size: 690 Bytes

Contents

require File.expand_path('../../common', __FILE__)
require File.expand_path('../../../lib/rrd-grapher/notifier/structures', __FILE__)

describe 'Packet' do
  before do
    @point = Factory(:data_point)
  end

  should 'return formatted plugin' do
    @point.plugin = "plugin"
    @point.plugin_instance = nil

    @point.plugin_display.should == "plugin"

    @point.plugin_instance = "instance"
    @point.plugin_display.should == "plugin/instance"
  end

  should 'return formatted type' do
    @point.type = "type"
    @point.type_instance = nil

    @point.type_display.should == "type"

    @point.type_instance = "instance"
    @point.type_display.should == "type/instance"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rrd-grapher-1.0.3 spec/unit/structures_spec.rb
rrd-grapher-1.0.2 spec/unit/structures_spec.rb
rrd-grapher-1.0.1 spec/unit/structures_spec.rb
rrd-grapher-1.0.0 spec/unit/structures_spec.rb