Sha256: dc4640d0b829ef61f87b79660584ba61de6b2773b8ce164aeb7302bdcda99572

Contents?: true

Size: 722 Bytes

Versions: 7

Compression:

Stored size: 722 Bytes

Contents

require 'spec_helper'
require 'merb_global/message_providers/mock'

describe Merb::Global::MessageProviders::Mock do
  before do
    @provider = Merb::Global::MessageProviders::Mock.new
  end

  describe '.localize' do
    it 'should return plural for n > 1' do
      pl = Merb::Global::Locale.new(pl)
      @provider.localize('test', 'tests', 2, pl).should == 'tests'
    end

    it 'should return singular for n <= 1' do
      pl = Merb::Global::Locale.new(pl)
      @provider.localize('test', 'tests', 0, pl).should == 'test'
      @provider.localize('test', 'tests', 1, pl).should == 'test'
    end
  end

  describe '.create!' do
    it 'should do nothing' do
      @provider.create!.should be_nil
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
emipair-merb_global-0.0.12 spec/message_providers/mock_spec.rb
emipair-merb_global-0.0.11 spec/message_providers/mock_spec.rb
emipair-merb_global-0.0.10 spec/message_providers/mock_spec.rb
emipair-merb_global-0.0.9 spec/message_providers/mock_spec.rb
emipair-merb_global-0.0.3 spec/message_providers/mock_spec.rb
emipair-merb_global-0.0.2 spec/message_providers/mock_spec.rb
emipair-merb_global-0.0.1 spec/message_providers/mock_spec.rb