Sha256: 00bc0fe9527f52f20ea0a59b393d3534b80a680babc2d8f80e305239eaf7a12f

Contents?: true

Size: 514 Bytes

Versions: 3

Compression:

Stored size: 514 Bytes

Contents

require 'spec_helper'

describe RailsLocaleDetection::ControllerMethods do
  let(:request) { MockRequest.new }
  subject(:controller) { MockController.new(request) }

  it 'provides a blank user locale method' do
    controller.user_locale.should be_nil
  end
  
  it 'should provide a detect locale method' do
    controller.class.should respond_to(:detect_locale)
  end 
  
  it 'should add a before filter' do
    controller.class.before_filters.should eq([[RailsLocaleDetection::LocaleDetector]])
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_locale_detection-2.0.0.pre4 spec/rails_locale_detection/controller_methods_spec.rb
rails_locale_detection-2.0.0.pre3 spec/rails_locale_detection/controller_methods_spec.rb
rails_locale_detection-2.0.0.pre2 spec/rails_locale_detection/controller_methods_spec.rb