Sha256: 1e334f0618e95c15c9e71fc87d278ebed87bb4c9cefac89a66c11e2d40c36e5f

Contents?: true

Size: 365 Bytes

Versions: 5

Compression:

Stored size: 365 Bytes

Contents

require 'spec_helper'

describe Traducto::Helpers do
  describe "#t" do
    let(:action_view) { ActionView::Base.new }

    context "with the key welcome" do
      before { I18n.stub('translate').with('welcome', anything()).and_return('Hello!') }

      subject { action_view.t('welcome', format: :text) }

      it { should eql '<p>Hello!</p>' }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
traducto-1.0.4 spec/traducto/helpers_spec.rb
traducto-1.0.3 spec/traducto/helpers_spec.rb
traducto-1.0.2 spec/traducto/helpers_spec.rb
traducto-1.0.1 spec/traducto/helpers_spec.rb
traducto-1.0.0 spec/traducto/helpers_spec.rb