Sha256: a159ceaef93ccc96d2b5d8a2b32193ad213e676886a676812de34059ac9f7f58

Contents?: true

Size: 728 Bytes

Versions: 44

Compression:

Stored size: 728 Bytes

Contents

require 'test/unit'
require 'rubygems'

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

require File.join(File.dirname(__FILE__), '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
end

# Wrap tests that use Mocha and skip if unavailable.
def uses_mocha(test_name)
  require 'mocha' unless Object.const_defined?(:Mocha)
  yield
rescue LoadError => load_error
  raise unless load_error.message =~ /mocha/i
  $stderr.puts "Skipping #{test_name} tests. `gem install mocha` and try again."
end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
backlog-0.37.2 vendor/plugins/will_paginate/test/helper.rb
backlog-0.37.1 vendor/plugins/will_paginate/test/helper.rb
backlog-0.36.2 vendor/plugins/will_paginate/test/helper.rb
amrita2-2.0.1 sample/depot/vendor/plugins/will_paginate/test/helper.rb
amrita2-2.0.2 sample/depot/vendor/plugins/will_paginate/test/helper.rb
backlog-0.17.0 vendor/plugins/will_paginate/test/helper.rb
backlog-0.17.2 vendor/plugins/will_paginate/test/helper.rb
backlog-0.17.1 vendor/plugins/will_paginate/test/helper.rb
backlog-0.17.3 vendor/plugins/will_paginate/test/helper.rb
backlog-0.17.4 vendor/plugins/will_paginate/test/helper.rb
backlog-0.17.5 vendor/plugins/will_paginate/test/helper.rb
backlog-0.17.6 vendor/plugins/will_paginate/test/helper.rb
backlog-0.18.0 vendor/plugins/will_paginate/test/helper.rb
backlog-0.19.0 vendor/plugins/will_paginate/test/helper.rb
backlog-0.20.0 vendor/plugins/will_paginate/test/helper.rb
backlog-0.20.1 vendor/plugins/will_paginate/test/helper.rb
backlog-0.21.0 vendor/plugins/will_paginate/test/helper.rb
backlog-0.21.1 vendor/plugins/will_paginate/test/helper.rb
backlog-0.21.2 vendor/plugins/will_paginate/test/helper.rb
backlog-0.21.3 vendor/plugins/will_paginate/test/helper.rb