Skip to content

My hw 05#129

Open
DmitryS1989 wants to merge 8 commits intolabs-ruby:mainfrom
DmitryS1989:my_hw_05
Open

My hw 05#129
DmitryS1989 wants to merge 8 commits intolabs-ruby:mainfrom
DmitryS1989:my_hw_05

Conversation

@DmitryS1989
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Collaborator

@vladhilko vladhilko left a comment

Choose a reason for hiding this comment

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

Could you apply comments to all specs?

end

context 'when log is hash' do
it 'returns an emrpty array' do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
it 'returns an emrpty array' do
it 'returns an empty array' do

let(:obj) { described_class.new }

describe 'task 2' do
context 'when text wrong' do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
context 'when text wrong' do
context 'when text is wrong' do

# frozen_string_literal: true

RSpec.describe Homework3 do
let(:obj) { described_class.new }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Better to use subject

Suggested change
let(:obj) { described_class.new }
subject { described_class.new }

File.delete('spec/helpers/test.txt')
end

it 'file created' do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use present simple

Suggested change
it 'file created' do
it 'creates file' do

let(:file_name) { 'test.txt' }

describe '.create_file' do
context 'when succes create file' do
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can you rename this context?

@vladhilko
Copy link
Copy Markdown
Collaborator

Try to read https://www.betterspecs.org/ and impove your specs

@DmitryS1989 DmitryS1989 requested a review from vladhilko April 23, 2022 11:10
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