Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Locally passed test cases fail on auto-grader for HW5 #109

Open
an-ju opened this issue Jul 11, 2017 · 0 comments
Open

Locally passed test cases fail on auto-grader for HW5 #109

an-ju opened this issue Jul 11, 2017 · 0 comments

Comments

@an-ju
Copy link

an-ju commented Jul 11, 2017

For HW5 (https://github.com/saasbook/hw-acceptance-unit-test-cycle), some locally passed rspec tests failed on auto-grader.

Specifically, they are

    it 'should set variable properly' do
      get :related_movies, id: 1
      expect(assigns(:movies).length).to eq(2)
    end

    it 'should render the related_movies template' do
      get :related_movies, id: 1
      expect(response).to render_template('related_movies')
    end

The output of the auto-grader is

----BEGIN RSPEC----
--------------------------------------------------------------------------------
/home/ubuntu/.rvm/rubies/ruby-2.2.2/bin/ruby -I/home/ubuntu/.rvm/gems/ruby-2.2.2/gems/rspec-core-3.3.2/lib:/home/ubuntu/.rvm/gems/ruby-2.2.2/gems/rspec-support-3.3.0/lib /home/ubuntu/.rvm/gems/ruby-2.2.2/gems/rspec-core-3.3.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
..FF

Failures:

  1) MoviesController GET Related Movies should set variable properly
     Failure/Error: expect(assigns(:movies).length).to eq(2)
     NoMethodError:
       undefined method `length' for nil:NilClass
     # ./spec/controllers/search_movie_by_director_spec.rb:29:in `block (3 levels) in '

  2) MoviesController GET Related Movies should render the related_movies template
     Failure/Error: expect(response).to render_template('related_movies')
       expecting <"related_movies"> but rendering with <[]>
     # ./spec/controllers/search_movie_by_director_spec.rb:34:in `block (3 levels) in '

Finished in 0.07296 seconds (files took 2.93 seconds to load)
4 examples, 2 failures

Failed examples:

rspec ./spec/controllers/search_movie_by_director_spec.rb:27 # MoviesController GET Related Movies should set variable properly
rspec ./spec/controllers/search_movie_by_director_spec.rb:32 # MoviesController GET Related Movies should render the related_movies template

Coverage report generated for Cucumber Features, RSpec to /home/ubuntu/rag/submissions/d8ca89a1d3e9682e1efc16a6334af2ba/assignment4/2017-07-11-21-25-45/coverage. 48 / 53 LOC (90.57%) covered.

/home/ubuntu/.rvm/rubies/ruby-2.2.2/bin/ruby -S bundle exec cucumber  --profile default
/home/ubuntu/.rvm/rubies/ruby-2.2.2/bin/ruby -I/home/ubuntu/.rvm/gems/ruby-2.2.2/gems/rspec-core-3.3.2/lib:/home/ubuntu/.rvm/gems/ruby-2.2.2/gems/rspec-support-3.3.0/lib /home/ubuntu/.rvm/gems/ruby-2.2.2/gems/rspec-core-3.3.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed

----------------------------------------
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant