$count = 0 describe 'let!' do invocation_order = [] before(:each) { invocation_order << :before1 } let!(:count) do invocation_order << :let! $count += 1 end before(:each) { invocation_order << :before2 } it 'calls the helper method in a before hook in described order' do invocation_order << :example invocation_order.should == [:before1, :let!, :before2, :example] count.should == 1 end end % rspec