Skip to content

Instantly share code, notes, and snippets.

@susanwere
Created April 16, 2019 10:47
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 susanwere/43d1a9d6b11b9edab3713d775e407ef1 to your computer and use it in GitHub Desktop.
Save susanwere/43d1a9d6b11b9edab3713d775e407ef1 to your computer and use it in GitHub Desktop.
before hook for model
before do
@invalid_product = Product.new(title: '', description: '', price: '')
@valid_product = Product.new(title: 'One', description: 'description one', price: '100.00')
@invalid_price = Product.new(title: 'One', description: 'description one', price: '0.00')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment