Skip to content

added solution #89

Open
NawarYossef wants to merge 2 commits into
vikingeducation:masterfrom
NawarYossef:master
Open

added solution #89
NawarYossef wants to merge 2 commits into
vikingeducation:masterfrom
NawarYossef:master

Conversation

@NawarYossef

Copy link
Copy Markdown

No description provided.

@remis1889 remis1889 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also test all operations when stringify = true

Comment thread spec/calculator_spec.rb

it "divide a float and an integer" do
expect(calculator.divide(2.4, 2)).to be_within(0.5).of(1)
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

divide should raise an ArgumentError if second argument is less than equal to zero

Comment thread spec/calculator_spec.rb
end

it "returns 2-digit decimals for non-round roots" do
expect(calculator.sqrt(5.2)).to eq(2.28)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if the result has 2 decimal places exactly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants