Skip to content

James Biddle#91

Open
jimbiddle wants to merge 4 commits into
vikingeducation:masterfrom
jimbiddle:master
Open

James Biddle#91
jimbiddle wants to merge 4 commits into
vikingeducation:masterfrom
jimbiddle:master

Conversation

@jimbiddle

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.

The same statement, it 'returns the sum of its arguments' do, is used for all test cases.
Missing test cases for add, subtract, divide, pow, sqrt, memory and stringify.

Comment thread spec/calculator_spec.rb
@@ -1 +1,89 @@
# Your code here No newline at end of file
require 'calculator'
describe Calculator do

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

create a common instance for Calculator and use it throughout the specs.
let(:c) { Calculator.new }

Comment thread spec/calculator_spec.rb
describe Calculator do
describe '#add' do
it 'returns the sum of its arguments' do
expect(Calculator.new.add(1,2)).to eq(3)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

test if add method properly adds negative, integer or float numbers

Comment thread spec/calculator_spec.rb

describe '#subtract' do
it 'returns the sum of its arguments' do
expect(Calculator.new.subtract(1,2)).to eq(-1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

test if subtract method properly adds negative, integer or float numbers

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