elixir-maru / maru

Elixir RESTful Framework
https://maru.readme.io
BSD 3-Clause "New" or "Revised" License
1.32k stars 85 forks source link

Test: make_response should not require a version #24

Closed dblock closed 8 years ago

dblock commented 8 years ago

If you don't supply a version to make_response below (remove "v1")

    test "/" do
      assert %Plug.Conn {
        resp_body: "It works! port: 8800"
      } = conn(:get, "/") |> make_response("v1")
    end

you get

  1) test / (EchoServerTest)
     test/echo_server_test.exs:5
     ** (UndefinedFunctionError) undefined function EchoServer.__version__/0
     stacktrace:
       (echo_server) EchoServer.__version__()
       EchoServerTest.make_response/2
       test/echo_server_test.exs:6

Seems odd.

falood commented 8 years ago

It seems that these code is copied from maru_examples. The master version is totally rewrote version which is not forward compatible. I do not update maru_examples yet and I'll do it soon.

falood commented 8 years ago

I have update maru_examples for maru v0.10.0

dblock commented 8 years ago

I get it now, thanks!