Format code
This commit is contained in:
parent
2e2a8f6f8a
commit
19dc27e71b
|
@ -11,7 +11,7 @@ describe RuCaptcha::Captcha do
|
|||
end
|
||||
|
||||
it 'should not include [0ol1]' do
|
||||
10000.times do
|
||||
10_000.times do
|
||||
expect(RuCaptcha::Captcha.random_chars_without_cache).not_to match(/[0ol1]/i)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -48,7 +48,7 @@ describe RuCaptcha do
|
|||
end
|
||||
|
||||
describe 'Incorrect chars' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
simple.session[:_rucaptcha_at] = Time.now.to_i - 60
|
||||
simple.session[:_rucaptcha] = 'abcd'
|
||||
simple.params[:_rucaptcha] = 'd123'
|
||||
|
@ -57,7 +57,7 @@ describe RuCaptcha do
|
|||
end
|
||||
|
||||
describe 'Expires Session key' do
|
||||
it "should work" do
|
||||
it 'should work' do
|
||||
simple.session[:_rucaptcha_at] = Time.now.to_i - 121
|
||||
simple.session[:_rucaptcha] = 'abcd'
|
||||
simple.params[:_rucaptcha] = 'abcd'
|
||||
|
|
|
@ -6,9 +6,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|||
require 'rucaptcha'
|
||||
|
||||
tmp_path = File.join(File.dirname(__FILE__), '../tmp')
|
||||
if !File.exists?(tmp_path)
|
||||
Dir.mkdir(tmp_path)
|
||||
end
|
||||
Dir.mkdir(tmp_path) unless File.exist?(tmp_path)
|
||||
|
||||
module Rails
|
||||
class << self
|
||||
|
|
Loading…
Reference in New Issue