Browse files

fix tests on Ruby 1.8

  • Loading branch information...
1 parent 0223095 commit 7f723b5460f5c63f4a59dc733c332cf61dbd785d @mislav committed Nov 23, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 spec/view_helpers/view_example_group.rb
View
11 spec/view_helpers/view_example_group.rb
@@ -1,13 +1,18 @@
require 'active_support'
-require 'minitest/unit'
+begin
+ require 'minitest/unit'
+rescue LoadError
+ # Fails on Ruby 1.8, but it's OK since we only need MiniTest::Assertions
+ # on Rails 4 which doesn't support 1.8 anyway.
+end
require 'action_dispatch/testing/assertions'
require 'will_paginate/array'
module ViewExampleGroup
include ActionDispatch::Assertions::SelectorAssertions
- include MiniTest::Assertions
-
+ include MiniTest::Assertions if defined? MiniTest
+
def assert(value, message)
raise message unless value
end

0 comments on commit 7f723b5

Please sign in to comment.