Sha256: cf3489cf282bfa04e137231ab57a64b5c53388f4013061389c22cde8a06e4c52
Contents?: true
Size: 652 Bytes
Versions: 1
Compression:
Stored size: 652 Bytes
Contents
require 'minitest/autorun' require 'minitest/rg' require 'yaml' require './lib/codebadges/badges.rb' USERNAME = 'soumya.ray'.freeze badges_from_file = YAML.load(File.read('./spec/fixtures/badges.yml')) describe 'Get badges for one cadet' do cademy = CodeBadges::GetCodecademyBadges.new(ENV['CC_USERNAME'], ENV['CC_PASSWORD']) badges_found = cademy.call('soumya.ray') it 'has the right number of badges' do badges_found.size.wont_be :<, badges_from_file[USERNAME].size end badges_from_file[USERNAME].map do |b_name, b_date| it "finds '#{b_name}' badge" do badges_found[b_name].must_equal Date.parse(b_date) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
codebadges-3.0.0 | spec/badges_spec.rb |