I don't think the current RSpec has such a function, it would be nice to have some other method for these precondition statements such as
it "should increment by one" do value = 10 value.must eql(10) # This is a necessary pre-condition, not the actual test value += 1 value.should eql(11) end
But I believe that such a method does not exist, but rspec-given may be of interest.
source share