Skip to content

Instantly share code, notes, and snippets.

@we4tech
Created December 29, 2011 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save we4tech/1533379 to your computer and use it in GitHub Desktop.
Save we4tech/1533379 to your computer and use it in GitHub Desktop.
sample spec
describe 'auto increment' do
let!(:prev_widget) { FactoryGirl.create(:widget) }
let!(:new_widget) { FactoryGirl.create(:widget) }
subject { new_widget.sequence_no }
it { should be_incremented_by_one(prev_widget.sequence_no) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment