rename Option to OptionDefinition to be full Rails compliant
This commit is contained in:
20
spec/models/merged/option_definition_spec.rb
Normal file
20
spec/models/merged/option_definition_spec.rb
Normal 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
|
@ -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
|
@ -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
|
||||
|
Reference in New Issue
Block a user