Created
          October 17, 2016 17:09 
        
      - 
      
- 
        Save lkrych/354483503b3a87a6c9ad197f832b490b to your computer and use it in GitHub Desktop. 
    How to begin testing the movies_controller
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | require 'rails_helper' | |
| RSpec.describe MoviesController, type: :controller do | |
| describe "POST #create" do | |
| context "with valid attributes" do | |
| it "saves the new movie in the database" do | |
| end | |
| it "assigns the saved movie to @movie" do | |
| end | |
| it "redirects to the home page" do | |
| end | |
| end | |
| end | |
| describe "GET #show" do | |
| it "assigns the requested movie to @movie" do | |
| end | |
| it "renders the :show template" do | |
| end | |
| end | |
| describe "PUT #update" do | |
| it "located the requested movie" do | |
| end | |
| it "changed the requested movies attributes" do | |
| end | |
| it "redirects to the updated movie" do | |
| end | |
| end | |
| describe "DELETE #destroy" do | |
| it "deletes the movie" do | |
| end | |
| it "redirects to the main page " do | |
| end | |
| end | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment