# Testing "seam" in Elixir

**URL:** <https://forum.elixirforum.com/t/testing-seam-in-elixir/70397>\
**Category:** Discussions\
**Tags:** testing, exunit, unit-testing\
**Created:** [April 10, 2025, 9:37am UTC](https://forum.elixirforum.com/t/testing-seam-in-elixir/70397 "2025-04-10T09:37:02Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Eiji](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/32/36743_2.png) [@Eiji](https://forum.elixirforum.com/u/Eiji)\
**Post date:** [April 10, 2025, 11:00am UTC](https://forum.elixirforum.com/t/testing-seam-in-elixir/70397/13 "2025-04-10T11:00:20Z")

</div>

> [@lessless](#):
>
> ```elixir
> class PriceCalculatorStub < Price calculator
> def calculate_shipping(order)
> 1000
> end
> end
> 
> ```

Of course OOP in `Elixir` would not work, but there are few things that looks similar and use metaprogramming to achieve similar results:

1. [Kernel.defoverridable/1](https://hexdocs.pm/elixir/Kernel.html#defoverridable/1)
2. [oop](https://hex.pm/packages/oop) package (old)

---

_[View the full topic](https://forum.elixirforum.com/t/testing-seam-in-elixir/70397)._
