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

tr count issue #103

Open
tansaku opened this issue Jul 18, 2016 · 6 comments
Open

tr count issue #103

tansaku opened this issue Jul 18, 2016 · 6 comments
Assignees

Comments

@tansaku
Copy link
Contributor

tansaku commented Jul 18, 2016

see saasbook/hw-acceptance-unit-test-cycle#23 (comment)

@tansaku
Copy link
Contributor Author

tansaku commented Jul 18, 2016

replicated the error on the grader and locally:

      expected: 10
           got: 20

      (compared using ==)
       (RSpec::Expectations::ExpectationNotMetError)
      ./features/step_definitions/movie_steps.rb:19:in `block (2 levels) in <top (required)>'
      ./features/step_definitions/movie_steps.rb:17:in `/I should see all the movies/'
      features/sort_movies.feature:26:in `Then I should see all the movies'
    And I should see "Aladdin" before "The Terminator" # features/step_definitions/movie_steps.rb:23

@tansaku
Copy link
Contributor Author

tansaku commented Jul 18, 2016

in the first instance I am trying an upgrade of the internal rottenpotatoes app the grader uses for this acceptance-unit-test-cycle assignment ...

@tansaku
Copy link
Contributor Author

tansaku commented Jul 18, 2016

this is the structure of that app embedded in the grader:

[tansaku@Samuels-MBP:~/Documents/GitHub/saasbook/rag/hw4_grader_stuff/hw4_rottenpotatoes (103_tr_count_issue)]$ 
→ tree
.
├── Gemfile
├── Gemfile.lock
├── README
├── Rakefile
├── app
│   ├── assets
│   │   ├── images
│   │   │   └── rails.png
│   │   ├── javascripts
│   │   │   └── application.js
│   │   └── stylesheets
│   │       └── application.css
│   ├── controllers
│   │   ├── application_controller.rb
│   │   └── movies_controller.rb
│   ├── helpers
│   │   ├── application_helper.rb
│   │   └── movies_helper.rb
│   ├── mailers
│   ├── models
│   │   └── movie.rb
│   └── views
│       ├── layouts
│       │   └── application.html.haml
│       └── movies
│           ├── edit.html.haml
│           ├── index.html.haml
│           ├── new.html.haml
│           └── show.html.haml
├── autotest
│   └── discover.rb
├── config
│   ├── 20120130161449_add_more_movies.rb
│   ├── application.rb
│   ├── boot.rb
│   ├── cucumber.yml
│   ├── database.yml
│   ├── environment.rb
│   ├── environments
│   │   ├── development.rb
│   │   ├── production.rb
│   │   └── test.rb
│   ├── initializers
│   │   ├── backtrace_silencers.rb
│   │   ├── inflections.rb
│   │   ├── mime_types.rb
│   │   ├── secret_token.rb
│   │   ├── session_store.rb
│   │   └── wrap_parameters.rb
│   ├── locales
│   │   └── en.yml
│   └── routes.rb
├── config.ru
├── db
│   ├── migrate
│   │   ├── 20111119180638_create_movies.rb
│   │   └── 20120130161449_add_more_movies.rb
│   ├── schema.rb
│   ├── seeds.rb
│   └── test.sqlite3
├── doc
│   └── README_FOR_APP
├── features
│   ├── step_definitions
│   │   ├── saas_web_steps.rb
│   │   └── web_steps.rb
│   └── support
│       ├── env.rb
│       ├── paths.rb
│       └── selectors.rb
├── lib
│   ├── assets
│   └── tasks
│       ├── cucumber.rake
│       └── saas.rake
├── log
│   ├── development.log
│   └── test.log
├── public
│   ├── 404.html
│   ├── 422.html
│   ├── 500.html
│   ├── favicon.ico
│   ├── images
│   │   └── rails.png
│   ├── index.html
│   ├── javascripts
│   │   └── application.js
│   ├── robots.txt
│   └── stylesheets
│       └── general.css
├── required_features
│   └── director.feature
├── script
│   ├── cucumber
│   └── rails
├── spec
│   ├── rails_helper.rb
│   └── spec_helper.rb
└── vendor
    ├── assets
    │   └── stylesheets
    └── plugins

@tansaku
Copy link
Contributor Author

tansaku commented Jul 18, 2016

as far as I can see in the hw4_grader code (I know it's called hw5 now) - that directory is used like this:

      FileUtils.cp_r Dir.glob(File.join(@base_app_path, "*")), @temp
      FileUtils.cp_r Dir.glob(File.join(@submissiondir, ".")), @temp
      FileUtils.rm_r Dir.glob(@submissiondir)

i.e. that the entire app is copied in a temp directory, and then the students submission is copied over the top of it.

After that the grader runs:

 bundle install --without production
 bundle exec rake db:migrate
 bundle exec rake db:test:prepare

and finally

bundle exec rake saas:run_student_tests

where that rake task is:

namespace :saas do 
  task :run_student_tests => :environment do
    desc "Runs all tasks for grading"

    errors = []

    puts "----BEGIN CUCUMBER----"
    puts "-"*80
    begin
      Rake::Task["cucumber"].invoke
    rescue StandardError => e
      errors << e.message
    end
    puts "-"*80
    puts "----END CUCUMBER----"

    puts "----BEGIN RSPEC----"
    puts "-"*80
    begin
      Rake::Task["spec"].invoke
    rescue StandardError => e
      errors << e.message
    end
    puts "-"*80
    puts "----END RSPEC----"

    puts errors.join("\n") if errors.any?
  end
end

@tansaku
Copy link
Contributor Author

tansaku commented Jul 18, 2016

so complete update of that internal app here does not impact this tr count issue ... perhaps I can get into the temp directory and inspect the actual app to see what's going on ....

@tansaku
Copy link
Contributor Author

tansaku commented Jul 18, 2016

ironically in that temp directory everything passes fine - I can't replicate the error ...

@tansaku tansaku self-assigned this Aug 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant