Open jamesdabbs opened 9 years ago
https://github.com/msmukherji/showtime-with-tests
(haven't done cancancan stuff yet)
Nice work, and excellent test coverage! :star2:
A few notes:
when "r", "nc-17", "unrated"
age >= 17
when "pg-13"
age >= 13
else
true
end
In general, movie ratings seem like a good place to extract a value object
decribe "underage users"
block with a before(:each) { @user = create :user, age: 13 }
to unify some of that common setup, but that's minor.plan
isn't a great name for this field. It took me a minute (and reading the rest of the file) to decide if that was a plan number (like basic level: 3 movies) or just the number of movies you get.expect { ... }.to change { user.moveis.count }.by 1
pattern, if you're in to that sort of thing.
Due on Mar 12 @ 10:00am Build a small but well-tested portion of a movie rental and streaming Rails app
Objectives
Learning Objectives
Performance Objectives
cancancan
to secure your apprspec
,factory_girl
, and spec helpers to TDD and build a robust spec suiteDetails
Deliverables
A repo containing a Rails app with:
MoviesController
withstream
,checkout
andcheckin
actionsRequirements
rspec
should produce only passing specsNormal Mode
simplecov
to verify your test coverageHard Mode
Any of:
Nightmare Mode
Any of: