Thursday, February 18, 2016

Fixtures - Mintest

ActiveRecord FixtureSet

rubyonrails.org/testing


funclub/test/fixtures/exercises.yml
arms:
  name: windmills
  sets: 3
  reps: 10
  notes: They are fun but be careful not to go too fast and hurt your shoulders.
  bodypart: arms
  workout_id: 1

core:
  name: situps
  sets: 4
  reps: 25
  notes: A classic stength builder for a beach body.
  bodypart: Abs
  workout_id: 2

To run the tests:
$ bin/rake test test/models/article_test.rb

No comments:

Post a Comment