RSpec

Perl で RSpec の expect ... change 構文を模倣する

expect.pl sub expect (&@) { my ($effector, $comparator, $state) = @_; my ($before, undef, $after) = map { $_->() } ($state, $effector, $state); cmp_ok $before, $comparator, $after; } sub make_changes (&) { my ($actual) = @_; ("!=", $actual…