Syntax for specs adjusted for consistency reasons

is_expected.to has been replaced by should
is_expected.not_to has been replaced by should_not
This commit is contained in:
Juan Salvador Pérez García
2018-06-22 17:35:33 +02:00
parent 0659bc2fab
commit 28e17abe72
4 changed files with 31 additions and 31 deletions

View File

@@ -20,25 +20,25 @@ describe ProposalDashboardAction do
let(:request_to_administrators) { true }
let(:action_type) { 'resource' }
it { is_expected.to be_valid }
it { should be_valid }
context 'when validating title' do
context 'and title is blank' do
let(:title) { nil }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
context 'and title is very short' do
let(:title) { 'abc' }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
context 'and title is very long' do
let(:title) { 'a' * 81 }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
end
@@ -46,19 +46,19 @@ describe ProposalDashboardAction do
context 'and description is blank' do
let(:description) { nil }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
context 'and description is very short' do
let(:description) { 'abc' }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
context 'and description is very long' do
let(:description) { 'a' * 256 }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
end
@@ -66,19 +66,19 @@ describe ProposalDashboardAction do
context 'and day_offset is nil' do
let(:day_offset) { nil }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
context 'and day_offset is negative' do
let(:day_offset) { -1 }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
context 'and day_offset is not an integer' do
let(:day_offset) { 1.23 }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
end
@@ -86,19 +86,19 @@ describe ProposalDashboardAction do
context 'and required_supports is nil' do
let(:required_supports) { nil }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
context 'and required_supports is negative' do
let(:required_supports) { -1 }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
context 'and required_supports is not an integer' do
let(:required_supports) { 1.23 }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
end
@@ -108,13 +108,13 @@ describe ProposalDashboardAction do
context 'and no request_to_administrators' do
let(:request_to_administrators) { false }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
context 'and request_to_administrators' do
let(:request_to_administrators) { true }
it { is_expected.to be_valid }
it { should be_valid }
end
end
@@ -124,14 +124,14 @@ describe ProposalDashboardAction do
context 'and no request_to_administrators' do
let(:request_to_administrators) { false }
it { is_expected.to be_valid }
it { should be_valid }
end
end
context 'when action type is nil' do
let(:action_type) { nil }
it { is_expected.not_to be_valid }
it { should_not be_valid }
end
end