Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

2 more passing tests for the rubinius implementation

  • Loading branch information...
commit b150998ab12ea669c24f984d1ca69abda0be56b5 1 parent 44694d2
Dan Manges authored

Showing 2 changed files with 3 additions and 7 deletions. Show diff stats Hide diff stats

  1. +2 0  lib/mixology_rubinius.rb
  2. +1 7 test/mixology_test.rb
2  lib/mixology_rubinius.rb
... ... @@ -1,5 +1,6 @@
1 1 module Mixology
2 2 def mixin(mod)
  3 + unmix mod
3 4 reset_method_cache
4 5 IncludedModule.new(mod).attach_to metaclass
5 6 reset_method_cache
@@ -10,6 +11,7 @@ def unmix(mod_to_unmix)
10 11 last_super = metaclass
11 12 this_super = metaclass.direct_superclass
12 13 while this_super
  14 + break if this_super == self.class
13 15 if (this_super == mod_to_unmix ||
14 16 this_super.respond_to?(:module) && this_super.module == mod_to_unmix)
15 17 reset_method_cache
8 test/mixology_test.rb
@@ -44,9 +44,6 @@ def test_can_mixin_again
44 44 end
45 45
46 46 def test_unmix_effects_limited_to_instance
47   - if rubinius?
48   - print "PENDING"; return
49   - end
50 47 mixin = Module.new { def foo; "mixin"; end }
51 48 object = Class.new {include mixin}.new
52 49 assert_equal "mixin", object.foo
@@ -79,9 +76,6 @@ def test_included_modules_after_unmix
79 76 end
80 77
81 78 def test_included_modules_after_remix
82   - if rubinius?
83   - print "PENDING"; return
84   - end
85 79 mixin_one = Module.new
86 80 mixin_two = Module.new
87 81 object = Object.new
@@ -129,7 +123,7 @@ def test_nested_modules_are_mixedin_deeply
129 123 assert_equal [mixin, nested_module, nested_module_penultimate, nested_module_ultimate, Mixology, Kernel], (class << object; self; end).included_modules
130 124 end
131 125
132   - def test_nested_modules_are_mixedin_even_if_alrady_mixed_in
  126 + def test_nested_modules_are_mixedin_even_if_already_mixed_in
133 127 if rubinius?
134 128 print "PENDING"; return
135 129 end

0 comments on commit b150998

Please sign in to comment.
Something went wrong with that request. Please try again.