view modules/translate/spec/functions/translate_spec.rb @ 245:b0f8b88fea5c

Add "translate" module used by MySQL module
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Dec 2019 14:12:10 -0500
parents
children
line wrap: on
line source

require 'spec_helper'

describe 'translate' do
  it { is_expected.not_to eq nil }
  it { is_expected.to run.with_params('test string') }
  it { is_expected.to run.with_params(123).and_raise_error(ArgumentError) }
  it { is_expected.to run.with_params('test string', 123).and_raise_error(ArgumentError) }
  it { is_expected.to run.with_params('test %{interpolate_this}', 'interpolate_this' => 'ok').and_return('test ok') }
  it { is_expected.to run.and_raise_error(ArgumentError) }
end