From b60d02cc64d17496274a402727ba491373a56ef3 Mon Sep 17 00:00:00 2001 From: Sarvar Khamidov Date: Tue, 20 Dec 2022 13:40:00 -0500 Subject: [PATCH 1/3] Added Team Module Test --- spec/model/team_model.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 spec/model/team_model.rb diff --git a/spec/model/team_model.rb b/spec/model/team_model.rb new file mode 100644 index 0000000..6f81c58 --- /dev/null +++ b/spec/model/team_model.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe Team, type: :model do + let(:new_team) do Team.new(id: 1, team: "123", manager: 2) + end + + it 'Team module has team equal to 123' do + expect(new_team.team).to eq("123") + end + + it 'Team module has manager equal to 2' do + expect(new_team.manager).to eq(2) + end +end From 47cb02e9ee9f253b8d341b9fd43e8958d8eead3c Mon Sep 17 00:00:00 2001 From: Sarvar Khamidov Date: Tue, 20 Dec 2022 13:57:52 -0500 Subject: [PATCH 2/3] Put the Team.new into new line --- spec/model/team_model.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/model/team_model.rb b/spec/model/team_model.rb index 6f81c58..a41d0fc 100644 --- a/spec/model/team_model.rb +++ b/spec/model/team_model.rb @@ -3,7 +3,8 @@ require 'rails_helper' RSpec.describe Team, type: :model do - let(:new_team) do Team.new(id: 1, team: "123", manager: 2) + let(:new_team) do + Team.new(id: 1, team: "123", manager: 2) end it 'Team module has team equal to 123' do From eeb6eb4febb1ec6f43a1105bd433946d0b5de03c Mon Sep 17 00:00:00 2001 From: Sarvar Khamidov Date: Tue, 20 Dec 2022 14:04:58 -0500 Subject: [PATCH 3/3] Rename team_model.rb to team_spec.rb --- spec/model/{team_model.rb => team_spec.rb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename spec/model/{team_model.rb => team_spec.rb} (100%) diff --git a/spec/model/team_model.rb b/spec/model/team_spec.rb similarity index 100% rename from spec/model/team_model.rb rename to spec/model/team_spec.rb