Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Improve deep inheritance test
Browse files Browse the repository at this point in the history
  • Loading branch information
Braiden Vasco committed Jan 17, 2016
1 parent 564ccb6 commit 675062d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/behavior_test.rb
Expand Up @@ -192,6 +192,8 @@ def foo(a)
fn :cdr, [:a] do |a|
bar(a + 1)
end

fn :cdr2, [:a]
end

Typeclass.instance Bar, a: Integer do
Expand All @@ -201,8 +203,12 @@ def foo(a)
end

Typeclass.instance Cdr, a: Integer do
def cdr2(a)
bar(a + 2)
end
end

assert_equal 6, Cdr.cdr(2)
assert_equal 8, Cdr.cdr2(2)
end
end

0 comments on commit 675062d

Please sign in to comment.