You need RSpec installed to run these tests.
gem install rspec
rspec credit_card_spec.rb
The CreditCard
class is currently working but the code is in need of some refactoring. Refactor it (ensuring that the specs continue to pass) and when you are finished, share the gist with us.
Feel free to include in your gist a README containing an explanation of your refactorings and any thoughts or philosophies behind what you did. We're particularly interested in understanding what you personally consider to be good code, and this exercise will help us see into that a bit.