Sha256: f25d1857f7e63b11f41d0fecf02fba368c7bdaefd1b365094118b12c3c10b32f

Contents?: true

Size: 624 Bytes

Versions: 2

Compression:

Stored size: 624 Bytes

Contents

# coding: utf-8
require 'spec_helper'
describe Mastar::NameValuePair do
  context 'initialized with name and value' do
    before do
      @pair = Mastar::NameValuePair.new('label', 1)
    end
    describe '#name' do
      it 'is label' do
        @pair.name.should eq 'label'
      end
    end
    describe '#value' do
      it 'is 1' do
        @pair.value.should eq 1
      end
    end
    describe '#first' do
      it 'is equal #name' do
        @pair.first.should eq @pair.name
      end
    end
    describe '#last' do
      it 'is equal #value' do
        @pair.last.should eq @pair.last
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mastar-1.0.0 spec/mastar/name_value_pair_spec.rb
mastar-0.9.0 spec/mastar/name_value_pair_spec.rb