From f8705c9fab1cd94e518b4eed52d84ec84fa1d6ad Mon Sep 17 00:00:00 2001 From: Alex McLain Date: Sun, 5 Apr 2026 13:20:20 -0700 Subject: [PATCH] Fix the dot syntax issue --- README.md | 2 -- lib/espec.ex | 1 + spec/dot_syntax_spec.exs | 5 +++++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 spec/dot_syntax_spec.exs diff --git a/README.md b/README.md index 40544120..47f5ccad 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,6 @@ It is NOT a wrapper around ExUnit but a completely new testing framework written * There are two types of expectation syntax: - `expect` syntax with pipe operator `expect smth1 |> to(eq smth2)` or `is_expected |> to(eq smth)` when `subject` is defined; - `should` syntax: `smth1 |> should(eq smth2)` or `should eq smth` when `subject` is defined. - - ##### Note: RSpec syntax `expect(smth1).to eq(smth2)` is deprecated and won't work with OTP 21. * `before` and `finally` blocks (like RSpec `before` and `after`). * `let`, `let!` and `subject`. * Shared examples. diff --git a/lib/espec.ex b/lib/espec.ex index 27c4b727..1ae4e3dc 100644 --- a/lib/espec.ex +++ b/lib/espec.ex @@ -14,6 +14,7 @@ defmodule ESpec do @shared unquote(args)[:shared] || false @before_compile ESpec + @compile :tuple_calls import ESpec.Context diff --git a/spec/dot_syntax_spec.exs b/spec/dot_syntax_spec.exs new file mode 100644 index 00000000..b243e2c2 --- /dev/null +++ b/spec/dot_syntax_spec.exs @@ -0,0 +1,5 @@ +defmodule DotSyntaxSpec do + use ESpec, async: true + + it do: expect(1 + 1).to eq(2) +end