Sha256: 8cfa7fbfd2c9365787e7560f827ee69e0fa7469eb0ccdf72bc197ff99b25bd9b

Contents?: true

Size: 806 Bytes

Versions: 3

Compression:

Stored size: 806 Bytes

Contents

# frozen_string_literal: true

#
# Copyright (c) 2018-present, Blue Marble Payroll, LLC
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#

require 'spec_helper'
require './spec/examples/converter_test_case'

describe Bumblebee::SimpleConverter do
  describe '#convert' do
    ConverterTestCase.all.each do |test_case|
      it "should convert: #{test_case.arg}" do
        converter = Bumblebee::SimpleConverter.new(test_case.arg)

        test_case.convert_cases.each do |convert_case|
          input = convert_case.first
          output = convert_case.last

          expect(converter.convert(input)).to eq(output)
          expect(converter.convert(input).class).to eq(output.class)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bumblebee-3.1.1 spec/bumblebee/simple_converter_spec.rb
bumblebee-3.1.0 spec/bumblebee/simple_converter_spec.rb
bumblebee-3.1.0.pre.alpha spec/bumblebee/simple_converter_spec.rb