Sha256: 200532f557b9a864fca4271018e7e4376142c7cb814e204885e6fca484904405
Contents?: true
Size: 1.18 KB
Versions: 5
Compression:
Stored size: 1.18 KB
Contents
require 'test_helper' class IterationTest < ActiveSupport::TestCase should validate_presence_of :name should validate_presence_of :velocity should validate_numericality_of :velocity should have_many :stories should have_many(:geeks).through(:participations) should have_many :participations should belong_to :release context "An Iterations's burndown data method" do context "for incomplete stories" do setup do @iteration = Iteration.make Story.make(:points => 5, :iteration => @iteration) Story.make(:points => 2, :iteration => @iteration) end should "return an empty array" do assert_equal @iteration.burndown_data, [] end end context "for completed and qa stories" do setup do @iteration = Iteration.make Story.make(:points => 5, :iteration => @iteration, :status => "quality_assurance") Story.make(:points => 5, :iteration => @iteration, :status => "completed") Story.make(:points => 2, :iteration => @iteration, :status => "completed") end should "return a points value" do assert_match /7/, @iteration.burndown_data.to_s end end end end
Version data entries
5 entries across 5 versions & 1 rubygems