test/requirement_spec: use stub_const
This commit is contained in:
parent
50b0940c72
commit
43e5352074
@ -163,11 +163,7 @@ describe Requirement do
|
|||||||
let(:klass) { self.class.const_get(const) }
|
let(:klass) { self.class.const_get(const) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
self.class.const_set(const, Class.new(described_class))
|
stub_const const.to_s, Class.new(described_class)
|
||||||
end
|
|
||||||
|
|
||||||
after do
|
|
||||||
self.class.send(:remove_const, const)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
its(:name) { is_expected.to eq("foo") }
|
its(:name) { is_expected.to eq("foo") }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user