Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix memcached library detection

  • Loading branch information...
commit a4c5135c33ddc2bcc1951afd64e9c19a5688c6e5 1 parent 5632876
@rtomayko rtomayko authored
Showing with 6 additions and 3 deletions.
  1. +2 −2 Rakefile
  2. +3 −0  test/spec_setup.rb
  3. +1 −1  test/storage_test.rb
View
4 Rakefile
@@ -20,8 +20,8 @@ end
desc 'Run specs with unit test style output'
task :test => FileList['test/*_test.rb'] do |t|
- suite = t.prerequisites.map{|f| "-r#{f.chomp('.rb')}"}.join(' ')
- sh "ruby -Ilib:test #{suite} -e ''", :verbose => false
+ suite = t.prerequisites
+ sh "testrb -Ilib:test #{suite.join(' ')}", :verbose => false
end
desc 'Generate test coverage report'
View
3  test/spec_setup.rb
@@ -21,6 +21,9 @@ def have_memcached?(server=ENV['MEMCACHED'])
$memcached = Memcached.new(server)
$memcached.set('ping', '')
true
+rescue LoadError => boom
+ $memcached = nil
+ false
rescue => boom
$memcached = nil
false
View
2  test/storage_test.rb
@@ -82,7 +82,7 @@
end
end
- if ENV['MEMCACHED']
+ if have_memcached?
describe 'MemCache Store URIs' do
%w[memcache: memcached:].each do |scheme|
Please sign in to comment.
Something went wrong with that request. Please try again.