- added 'spec' rake task to run all specs
- added spec to confirm that localization is working
This commit is contained in:
Родитель
7b656f489c
Коммит
9fdf2472c7
|
@ -65,6 +65,17 @@ describe 'CASServer' do
|
|||
page.should have_xpath('//input[@id="service"]', :value => @target_service)
|
||||
end
|
||||
|
||||
it "uses appropriate localization when 'lang' prameter is given" do
|
||||
visit "/login?lang=pl"
|
||||
page.should have_content("Użytkownik")
|
||||
|
||||
visit "/login?lang=pt_BR"
|
||||
page.should have_content("Usuário")
|
||||
|
||||
visit "/login?lang=en"
|
||||
page.should have_content("Username")
|
||||
end
|
||||
|
||||
end # describe '/login'
|
||||
|
||||
|
||||
|
|
|
@ -12,8 +12,11 @@ set :run, false
|
|||
set :raise_errors, true
|
||||
set :logging, false
|
||||
|
||||
# Avoid potential weirdness by changing the working directory to the CASServer root
|
||||
FileUtils.cd('..')
|
||||
|
||||
if Dir.getwd =~ /\/spec$/
|
||||
# Avoid potential weirdness by changing the working directory to the CASServer root
|
||||
FileUtils.cd('..')
|
||||
end
|
||||
|
||||
def silence_warnings
|
||||
old_verbose, $VERBOSE = $VERBOSE, nil
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
require 'spec/rake/spectask'
|
||||
desc 'Run RSpecs to confirm that all functionality is working as expected'
|
||||
Spec::Rake::SpecTask.new('spec') do |t|
|
||||
t.spec_files = FileList['spec/**/*_spec.rb']
|
||||
end
|
Загрузка…
Ссылка в новой задаче