mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Implicit subject should not use .new with modules
Fixes GitHub issue https://github.com/icy-arctic-fox/spectator/issues/6
This commit is contained in:
parent
f5f1361477
commit
e92aa7ed57
2 changed files with 19 additions and 3 deletions
|
@ -2,6 +2,8 @@ require "./spec_helper"
|
|||
|
||||
class Base; end
|
||||
|
||||
module SomeModule; end
|
||||
|
||||
Spectator.describe "Subject" do
|
||||
subject { Base.new }
|
||||
|
||||
|
@ -10,4 +12,12 @@ Spectator.describe "Subject" do
|
|||
expect(subject).to be_a(Base)
|
||||
end
|
||||
end
|
||||
|
||||
context "module" do
|
||||
describe SomeModule do
|
||||
it "sets the implicit subject to the module" do
|
||||
expect(subject).to be(SomeModule)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue