Skip to content

Commit

Permalink
add test for complex expect expression
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Aug 14, 2024
1 parent 96d7fe9 commit 474490a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/transition_through_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ def increment(n = 1) = n.times { self.count += 1 }
it 'should support range' do
expect { counter.increment(3) }.to transition { counter.count }.through 0..3
end

it 'should track transitions' do
expect {
counter.count = 0
counter.count += 1
counter.count = counter.count + 3
counter.count -= 2
}.to transition { counter.count }.through [0, 1, 4, 2]
end
end

context 'using ivars' do
Expand Down

0 comments on commit 474490a

Please sign in to comment.