teamsnap / teamsnap-mega-tournament

Help us save the TeamSnap Mega-Tournament!
1 stars 1 forks source link

Sets up Rspec for adding tests #1

Closed stevencwarren closed 3 years ago

stevencwarren commented 3 years ago
stevencwarren commented 3 years ago

I spoke with @bradcypert yesterday.

I thought that it may be easier to go ahead and add some setup around RSpec and testing so that they don't have to spend time setting up and configuring RSpec. They can spend their time actively building something. I am hoping that this will reduce the barrier for an interviewee to write test for their submission.

The main drawback I see in adding this is that we are basically requiring knowledge of RSpec. I can change this pr so that they can choose either RSpec or Test::Unit.

What do you all think?

semmons99 commented 3 years ago

If this was for a junior developer, I would prefer MiniTest/Test::Unit since they are in the stdlib. However, if we are looking for mid+ folks, using RSpec should not be a big hurdle IMO.

ryanwi commented 3 years ago

Do you want to include instructions for running the tests? Or is figuring that out part of the exercise. The backend/readme has the db setup step mentioned, could put it in there?

I think most beginner/mids with rails would likely be more familiar with Rspec, I feel like it's what is used most often in tutorials.

DB setup is failing, following the backend/README

TeamBook:teamsnap-mega-tournament $ docker-compose run backend bundle exec rake db:create
Creating network "teamsnap-mega-tournament_default" with the default driver
Pulling db (postgres:11)...
Creating postgres ... done
Creating teamsnap-mega-tournament_backend_run ... done
The Gemfile's dependencies are satisfied
could not connect to server: Connection refused
    Is the server running on host "0.0.0.0" and accepting
    TCP/IP connections on port 5432?
Couldn't create 'myapp_development' database. Please check your configuration.
rake aborted!
PG::ConnectionBad: could not connect to server: Connection refused
    Is the server running on host "0.0.0.0" and accepting
    TCP/IP connections on port 5432?