Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Stop accidentally defining RSpec
Browse files Browse the repository at this point in the history
See #6 for more info
  • Loading branch information
benmacleod authored and tjschuck committed Jul 28, 2014
1 parent 1378397 commit b551619
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions lib/time_warp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,31 @@ class TestCase
end
end

module MiniTest
class Unit
class TestCase
if defined?(Minitest::Test)
module Minitest
class Test
include ::TimeWarpAbility
end
end
end

module RSpec
module Core
class ExampleGroup
include ::TimeWarpAbility
# Time warp to the specified time for the duration of the passed block.
if defined?(MiniTest::Unit::TestCase)
module MiniTest
class Unit
class TestCase
include ::TimeWarpAbility
end
end
end
end

module Minitest
class Test
include ::TimeWarpAbility
if defined?(RSpec::Core::ExampleGroup)
module RSpec
module Core
class ExampleGroup
include ::TimeWarpAbility
# Time warp to the specified time for the duration of the passed block.
end
end
end
end

0 comments on commit b551619

Please sign in to comment.