# frozen_string_literal: true require 'spec_helper' describe DeepL::Resources::Text do subject { described_class.new('Target', 'es', nil, nil) } describe '#initialize' do context 'When building a basic object' do it 'should create a resource' do expect(subject).to be_a(described_class) end it 'should assign the attributes' do expect(subject.text).to eq('Target') expect(subject.detected_source_language).to eq('es') end end end end