ndreynolds / ratatouille

A TUI (terminal UI) kit for Elixir
MIT License
752 stars 39 forks source link

Testing Update #18

Closed KTSCode closed 4 years ago

KTSCode commented 4 years ago

I'd like to be able to write tests for the update function of my Ratatouille app, but I'm having some trouble.

Based off the counter example:

  describe "update" do
    test "when + is pressed, the model is incremented by 1" do
      assert Counter.App.update(0, {:event, %{ch: ?+}}) == 1
    end
  end

Fails with (UndefinedFunctionError) function Counter.App.update/2 is undefined or private

KTSCode commented 4 years ago

I had just misnamed my test module, sorry about that.