spec/statesman/adapters/shared_examples.rb in statesman-10.1.0 vs spec/statesman/adapters/shared_examples.rb in statesman-10.2.0

- old
+ new

@@ -28,17 +28,17 @@ its(:parent_model) { is_expected.to be(model) } its(:history) { is_expected.to eq([]) } end describe "#create" do - subject { -> { create } } + subject(:transition) { create } let(:from) { :x } let(:to) { :y } let(:there) { :z } let(:create) { adapter.create(from, to) } - it { is_expected.to change(adapter.history, :count).by(1) } + it { expect { transition }.to change(adapter.history, :count).by(1) } context "the new transition" do subject(:instance) { create } it { is_expected.to be_a(transition_class) }