I find the .and
method very useful for chaining many expectations.
expect {
click_button 'Update Boilerplate'
@boilerplate_original.reload
} .to change { @boilerplate_original.title }.to('A new boilerplate')
.and change { @boilerplate_original.intro }.to('Some nice introduction')
Is there something that let's me check for no change?
.and_not change { @boilerplate_original.intro }
Something like that? I couldn't find anything, and it's hard to search on Google for something like "and not".
question from:
https://stackoverflow.com/questions/34967391/rspec-is-there-a-not-for-and-change-e-g-and-not-to-change 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…