shard-spectator/spec/features/subject_spec.cr

24 lines
426 B
Crystal
Raw Normal View History

2021-10-09 19:39:44 +00:00
require "../spec_helper"
2020-01-20 05:05:38 +00:00
class Base; end
module SomeModule; end
2022-05-25 23:20:57 +00:00
Spectator.describe "Subject", :smoke do
2020-01-20 05:05:38 +00:00
subject { Base.new }
context "nested" do
it "inherits the parent explicit 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
2020-01-20 05:05:38 +00:00
end