Files
grecia/spec/models/budget/investment/milestone_spec.rb
Bertocq ed16a78f42 Enables RSpec/ExampleWording and fixes all issues
Both avoiding 'should' and repiting 'it' on the tests description
improves reading them and also makes all descriptions consistent.

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
2018-01-07 01:03:45 +01:00

29 lines
612 B
Ruby

require 'rails_helper'
describe Budget::Investment::Milestone do
describe "Validations" do
let(:milestone) { build(:budget_investment_milestone) }
it "is valid" do
expect(milestone).to be_valid
end
it "is not valid without a title" do
milestone.title = nil
expect(milestone).to_not be_valid
end
it "is not valid without a description" do
milestone.description = nil
expect(milestone).to_not be_valid
end
it "is not valid without an investment" do
milestone.investment_id = nil
expect(milestone).to_not be_valid
end
end
end