mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Adjust evaluation order of change matcher expressions
Handles reference types better and matches RSpec more closely.
This commit is contained in:
parent
739629ef9d
commit
0704fd2a48
5 changed files with 73 additions and 66 deletions
|
@ -34,16 +34,14 @@ Spectator.describe "Explicit Subject" do
|
|||
|
||||
subject { @@element_list.pop }
|
||||
|
||||
skip "is memoized across calls (i.e. the block is invoked once)",
|
||||
reason: "RSpec calls the \"actual\" block after the \"change block\"." do
|
||||
it "is memoized across calls (i.e. the block is invoked once)" do
|
||||
expect do
|
||||
3.times { subject }
|
||||
end.to change { @@element_list }.from([1, 2, 3]).to([1, 2])
|
||||
expect(subject).to eq(3)
|
||||
end
|
||||
|
||||
skip "is not memoized across examples",
|
||||
reason: "RSpec calls the \"actual\" block after the \"change block\"." do
|
||||
it "is not memoized across examples" do
|
||||
expect { subject }.to change { @@element_list }.from([1, 2]).to([1])
|
||||
expect(subject).to eq(2)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue