Git Product home page Git Product logo

crib's People

Contributors

joncodo avatar lucaskauz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

crib's Issues

card_spec.rb code review

I would get rid of the before(:each) block and just create the cards as needed. Because you're creating cards you aren't using in your tests.

I think describe Card, '#value' can be describe '#value' since it's already within the describe Card block.

Change the spec-name 'is has the number value...' to 'is the rank value...'

Create a Rakefile

This will allow you to use rake to automate testing and code coverage.

I suggesting adding a test and coverage task.

rake test # run all tests
rake coverage # generate a code coverage report using simplecov

Example Rakefile snippet:

desc 'Generate coverage report'
task :coverage do
  ENV['COVERAGE'] = 'true'
  system('rake test')
end

Create a .gitignore file

Reason: these files have to do more with your programming environment than the problem domain.

Remove the .idea and .DS_Store files from source control, and add a .gitignore
file with the following entries

.idea
.DS_store

card.rb: refactor display_value to to_s.

Reason: to_s is ruby's idiomatic way of representing a class as a string.

Get rid of the display_value field, and add a to_s method that does the same thing.

def to_s
  "#{number}-#{suit}"
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.