Permalink
Browse files

Patch mutant only if Mutant module is present

  • Loading branch information...
1 parent c87a262 commit 225d054a7d2ba7a7d8e157580fcd5926aa4618e1 @indrekj indrekj committed May 28, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 spec/spec_helper.rb
View
6 spec/spec_helper.rb
@@ -31,9 +31,9 @@
# Mutant is already using inflecto. If it mutates inflecto methods then our
# tests start to fail. Instead, we force mutant to use unmutated version of
# inflecto.
-module Mutant
- module Inflecto
- if RUBY_VERSION >= '1.9'
+if defined?(Mutant)
+ module Mutant
+ module Inflecto
::Inflecto.singleton_methods.each do |name|
define_singleton_method name, ::Inflecto.method(name).to_proc
end

0 comments on commit 225d054

Please sign in to comment.