mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add reduced test code for GitLab issue 80
https://gitlab.com/arctic-fox/spectator/-/issues/80 Note: This test only triggers a compiler bug when the file is compiled by itself. Compiling/running the entire spec suite *does not* cause the bug.
This commit is contained in:
parent
7ffa63718b
commit
47a62ece78
1 changed files with 29 additions and 0 deletions
29
spec/issues/gitlab_issue_80_spec.cr
Normal file
29
spec/issues/gitlab_issue_80_spec.cr
Normal file
|
@ -0,0 +1,29 @@
|
|||
require "../spec_helper"
|
||||
|
||||
# https://gitlab.com/arctic-fox/spectator/-/issues/80#
|
||||
|
||||
class Item
|
||||
end
|
||||
|
||||
class ItemUser
|
||||
@item = Item.new
|
||||
|
||||
def item
|
||||
@item
|
||||
end
|
||||
end
|
||||
|
||||
Spectator.describe "test1" do
|
||||
it "without mock" do
|
||||
item_user = ItemUser.new
|
||||
item = item_user.item
|
||||
item == item
|
||||
end
|
||||
end
|
||||
|
||||
Spectator.describe "test2" do
|
||||
mock Item do
|
||||
end
|
||||
it "without mock" do
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue