Skip to content

Commit

Permalink
fix(sprint_cleaner): moves back to named parameters
Browse files Browse the repository at this point in the history
- moves back to names parameters, fixes the call to cleanup function in
cli.rb
- adds test in cli_spec to not raise an argument error
- adds test in sprint_cleaner_spec for when the argument error is raised
  • Loading branch information
ankitkataria committed Jun 28, 2018
1 parent b3809fb commit decf97c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/unit/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,13 @@
expect(@cli.send(:board_id, 'MyTrelloBoard')).to eq('53186e8391ef8671265eba9d')
end
end

context 'sprint cleanup' do
it 'should not return ArgumentError' do
@cli.options = {'board-id' => '1234', 'target-board-id' => '123'}
expect do
@cli.cleanup_sprint
end.not_to raise_error(ArgumentError)
end
end
end
6 changes: 6 additions & 0 deletions spec/unit/scrum/sprint_cleaner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
end
end

context 'with named parameter not given', :focus do
it 'should raise ArgumentError' do
expect { subject.cleanup('7Zar7bNm', '72tOJsGS', true) }.to raise_error(ArgumentError)
end
end

context 'given correct burndown-data-xx.yaml' do
before do
allow_any_instance_of(BurndownChart).to receive(:update)
Expand Down

0 comments on commit decf97c

Please sign in to comment.