You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve got some problems with dry validation translations into the Reform::Form.
I have some contracts with the following configuration
class New < Reform::Form
.
.
.
configure do
config.messages = :i18n
config.namespace = :administration_project_type
end
.
.
.
class New < Reform::Form
.
.
.
configure do
config.messages = :i18n
config.namespace = :administration_job_title
end
.
.
.
I also have some tests for those that go like this
it "project type must be filled" do
subject.name = nil
subject.valid?
expect(subject.errors[:name]).to include("Project type must be filled")
end
it "job title must be filled" do
subject.name = nil
subject.valid?
expect(subject.errors[:name]).to include("Job Title must be filled")
end
My locales look like this
en:
errors:
rules:
administration_project_type:
rules:
name:
filled?: "Project type must be filled"
unique_name?: "Project type name must be unique"
en:
errors:
rules:
administration_job_title:
rules:
name:
filled?: "Job Title must be filled"
unique_name?: "Job Title name must be unique"
I’m testing with Rspec. If I am to run the tests separately, they work fine. But when I run all tests, then I get errors such as
4) Administration::JobTitle::Contract::New validation job title must be filled
Failure/Error: expect(subject.errors[:name]).to include("Job Title must be filled")
expected ["Project subtype must be filled"] to include "Job Title must be filled"
# ./spec/concepts/administration/job_title/contract/new_spec.rb:15:in `block (3 levels) in <top (required)>'
7) Administration::ProjectType::Contract::New validation project type must be filled
Failure/Error: expect(subject.errors[:name]).to include("Project type must be filled")
expected ["Project subtype must be filled"] to include "Project type must be filled"
# ./spec/concepts/administration/project_type/contract/new_spec.rb:15:in `block (3 levels) in <top (required)>
The text was updated successfully, but these errors were encountered:
I’ve got some problems with dry validation translations into the Reform::Form.
I have some contracts with the following configuration
I also have some tests for those that go like this
My locales look like this
I’m testing with Rspec. If I am to run the tests separately, they work fine. But when I run all tests, then I get errors such as
The text was updated successfully, but these errors were encountered: