Last active
July 17, 2018 14:51
-
-
Save somethvictory/12a541bcafbe3d7f7ec483e646335027 to your computer and use it in GitHub Desktop.
Group similar specs in the same describe block.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
RSpec.describe Robot, 'Validations', type: :model do | |
it { is_expected.to validate_presence_of(:name) } | |
it { is_expected.to validate_presence_of(:color) } | |
end | |
RSpec.describe Robot, 'Associations', type: :model do | |
it { is_expected.to belong_to(:color) } | |
it { is_expected.to have_and_belong_to_many(:statuses) } | |
end | |
RSpec.describe Robot, 'Class Methods', type: :model do | |
# class methods specs go here... | |
end | |
RSpec.describe Robot, 'Instance Methods', type: :model do | |
# instance methods specs go here... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment