Refactor construct_graph_row_presenter to return negative values for x-offset and extract percentage method

This commit is contained in:
Alex Basson 2021-09-16 13:30:31 -04:00
parent 1782ef3482
commit 810a702333
3 changed files with 25 additions and 18 deletions

View file

@ -77,7 +77,7 @@ RSpec.describe "construct graph row presenter" do
end
it('returns an x-offset equal to the bar width') do
expect(presenter.x_offset).to eq 29
expect(presenter.x_offset).to eq -29
end
end
@ -95,7 +95,7 @@ RSpec.describe "construct graph row presenter" do
end
it('returns an x-offset equal to the bar width') do
expect(presenter.x_offset).to be > 0
expect(presenter.x_offset).to eq -216
end
end
@ -113,7 +113,7 @@ RSpec.describe "construct graph row presenter" do
end
it('returns an x-offset equal to the bar width') do
expect(presenter.x_offset).to eq 424
expect(presenter.x_offset).to eq -424
end
end
end