Sha256: 7e3e00f9af12de5f7baaf5ff94d5d4b799a85d9960545507fc3dd8781fd663ed

Contents?: true

Size: 545 Bytes

Versions: 2

Compression:

Stored size: 545 Bytes

Contents

require 'spec_helper'

describe Rlyeh::NumericReply do
  describe '#to_value' do
    [1, '1', '01', '001', 'welcome', :welcome].each do |arg|
      context "with argument #{arg.inspect}" do
        subject { Rlyeh::NumericReply.to_value arg }
        it { should eq '001' }
      end
    end
  end

  describe '#to_key' do
    [1, '1', '01', '001', 'welcome', :welcome].each do |arg|
      context "with argument #{arg.inspect}" do
        subject { Rlyeh::NumericReply.to_key arg }
        it { should eq :welcome }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rlyeh-0.1.1 spec/rlyeh/numeric_reply_spec.rb
rlyeh-0.0.2 spec/rlyeh/numeric_reply_spec.rb