Permalink
Browse files

fix failing spec when using ruby 1.8.7

  • Loading branch information...
1 parent 94936bc commit 975d4c94cff658212e249ce69b1b623403189e31 Corin Langosch committed May 25, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/sanitized_file_spec.rb
@@ -162,8 +162,8 @@
before do
@sanitized_file = CarrierWave::SanitizedFile.new(nil)
- regexp = RUBY_VERSION >= '1.9' ? '[^[:word:]\.\-\+]' : '[^ёЁа-яА-Яa-zA-Zà-üÀ-Ü0-9\.\-\+_]'
- @sanitized_file.stub(:sanitize_regexp).and_return(Regexp.new(regexp))
+ regexp = RUBY_VERSION >= '1.9' ? Regexp.new('[^[:word:]\.\-\+]') : /[^ёЁа-яА-Яa-zA-Zà-üÀ-Ü0-9\.\-\+_]/u
+ @sanitized_file.stub(:sanitize_regexp).and_return(regexp)
end
it "should default to the original filename if it is valid" do

0 comments on commit 975d4c9

Please sign in to comment.