Sha256: 7bd88be42c8bb3e372517281540369d8e009e5434b049ff2254c9b47e776aed5

Contents?: true

Size: 647 Bytes

Versions: 4

Compression:

Stored size: 647 Bytes

Contents

# Copyright 2022 Daniel Herzog
# Use of this source code is governed by an MIT
# license that can be found in the LICENSE.md file.
# frozen_string_literal: true

require 'spec_helper'

describe DeepL::Resources::LanguagePair do
  subject(:language_pair) { described_class.new('en', 'de', nil, nil) }

  describe '#initialize' do
    context 'when building a basic object' do
      it 'creates a resource' do
        expect(language_pair).to be_a(described_class)
      end

      it 'assigns the attributes' do
        expect(language_pair.source_lang).to eq('en')
        expect(language_pair.target_lang).to eq('de')
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
deepl-rb-3.1.0 spec/resources/language_pair_spec.rb
deepl-rb-3.0.2 spec/resources/language_pair_spec.rb
deepl-rb-3.0.1 spec/resources/language_pair_spec.rb
deepl-rb-3.0.0 spec/resources/language_pair_spec.rb