@@ -1861,24 +1861,24 @@ defmodule Mix.Tasks.Compile.ElixirTest do
1861
1861
defstruct []
1862
1862
end
1863
1863
1864
- defimpl Inspect , for: A do
1865
- def inspect(_, _ ), do: "sample"
1864
+ defimpl Collectable , for: A do
1865
+ def into(_ ), do: fn _, _ -> raise "oops" end
1866
1866
end
1867
1867
""" )
1868
1868
1869
1869
Mix.Project . push ( MixTest.Case.Sample )
1870
1870
assert Mix.Tasks.Compile . run ( [ ] ) == { :ok , [ ] }
1871
- assert inspect ( struct ( A , [ ] ) ) == "sample"
1871
+ assert is_function ( Collectable . into ( struct ( A , [ ] ) ) , 2 )
1872
1872
1873
- purge ( [ A , B , Inspect .A] )
1873
+ purge ( [ A , B , Collectable .A] )
1874
1874
Mix.Task . clear ( )
1875
1875
1876
1876
assert capture_io ( :stderr , fn ->
1877
1877
{ :ok , [ _ ] } = Mix.Tasks.Compile . run ( [ "--force" ] )
1878
1878
end ) =~
1879
- "the Inspect protocol has already been consolidated"
1879
+ "the Collectable protocol has already been consolidated"
1880
1880
1881
- purge ( [ A , B , Inspect .A] )
1881
+ purge ( [ A , B , Collectable .A] )
1882
1882
Mix.Task . clear ( )
1883
1883
consolidation = Mix.Project . consolidation_path ( )
1884
1884
args = [ "--force" , "--purge-consolidation-path-if-stale" , consolidation ]
0 commit comments