rename Option to OptionDefinition to be full Rails compliant

This commit is contained in:
2022-12-11 14:39:32 +02:00
parent aa20013121
commit 76f5e4e6e1
9 changed files with 26 additions and 26 deletions

View File

@ -0,0 +1,20 @@
require 'rails_helper'
module Merged
RSpec.describe OptionDefinition, type: :model do
let(:first) {OptionDefinition.first}
it "has OptionDefinition.first" do
expect(OptionDefinition.first.class).to be OptionDefinition
end
it "there are options" do
expect(OptionDefinition.all.length).to be 16
end
it "has option objects" do
expect(first.class).to be OptionDefinition
end
it "has values" do
expect(first.values.class).to be Array
end
end
end

View File

@ -1,20 +0,0 @@
require 'rails_helper'
module Merged
RSpec.describe Option, type: :model do
let(:first) {Option.first}
it "has Option.first" do
expect(Option.first.class).to be Option
end
it "there are options" do
expect(Option.all.length).to be 16
end
it "has option objects" do
expect(first.class).to be Option
end
it "has values" do
expect(first.values.class).to be Array
end
end
end

View File

@ -28,7 +28,7 @@ module Merged
it "has option_definitions" do
expect(last.option_definitions.class).to be Array
expect(last.option_definitions.length).to be 4
expect(last.option_definitions.second.class).to be Option
expect(last.option_definitions.second.class).to be OptionDefinition
expect(last.option_definitions.second.name).to eq "handler"
end
it "last has previous" do