Sha256: 7080780e2625727da19eddd41a33b6471aca086994913c15ada3c0d331b3f5a2

Contents?: true

Size: 932 Bytes

Versions: 16

Compression:

Stored size: 932 Bytes

Contents

require 'test/unit'
require 'rubygems'

# gem install redgreen for colored test output
begin require 'redgreen'; rescue LoadError; end

require 'boot' unless defined?(ActiveRecord)

class Test::Unit::TestCase
  protected
  def assert_respond_to_all object, methods
    methods.each do |method|
      [method.to_s, method.to_sym].each { |m| assert_respond_to object, m }
    end
  end

  def collect_deprecations
    old_behavior = WillPaginate::Deprecation.behavior
    deprecations = []
    WillPaginate::Deprecation.behavior = Proc.new do |message, callstack|
      deprecations << message
    end
    result = yield
    [result, deprecations]
  ensure
    WillPaginate::Deprecation.behavior = old_behavior
  end
end

# Wrap tests that use Mocha and skip if unavailable.
def uses_mocha(test_name)
  require 'mocha'
rescue LoadError
  $stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
else
  yield
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
will_mostly_paginate-2.4.3 test/helper.rb
will_mostly_paginate-2.4.2 test/helper.rb
refinerycms-0.9.6.34 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.33 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.32 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.31 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.30 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.29 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.28 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.27 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.26 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.25 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.24 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.23 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.22 vendor/plugins/will_paginate/test/helper.rb
refinerycms-0.9.6.21 vendor/plugins/will_paginate/test/helper.rb