splitting styles files and classes
This commit is contained in:
13
spec/models/merged/card_style_spec.rb
Normal file
13
spec/models/merged/card_style_spec.rb
Normal file
@ -0,0 +1,13 @@
|
||||
require 'rails_helper'
|
||||
|
||||
module Merged
|
||||
RSpec.describe CardStyle, type: :model do
|
||||
let(:first_card) {Style.cards.first}
|
||||
|
||||
it "has Style.cards" do
|
||||
expect(CardStyle.cards.class).to be Hash
|
||||
expect(CardStyle.cards.length).to be 4
|
||||
end
|
||||
|
||||
end
|
||||
end
|
21
spec/models/merged/section_style_spec.rb
Normal file
21
spec/models/merged/section_style_spec.rb
Normal file
@ -0,0 +1,21 @@
|
||||
require 'rails_helper'
|
||||
|
||||
module Merged
|
||||
RSpec.describe SectionStyle, type: :model do
|
||||
let(:first_section) {SectionStyle.sections.first}
|
||||
|
||||
it "has Style.sections" do
|
||||
expect(SectionStyle.sections.class).to be Hash
|
||||
expect(SectionStyle.sections.length).to be 6
|
||||
end
|
||||
it "Finds section by template" do
|
||||
spacer = SectionStyle.sections["section_spacer"]
|
||||
expect(spacer).not_to eq nil
|
||||
end
|
||||
it "Spacer has no fields" do
|
||||
spacer = SectionStyle.sections["section_spacer"]
|
||||
expect(spacer.fields).to be nil
|
||||
end
|
||||
|
||||
end
|
||||
end
|
@ -1,31 +0,0 @@
|
||||
require 'rails_helper'
|
||||
|
||||
module Merged
|
||||
RSpec.describe Style, type: :model do
|
||||
let(:first_section) {Style.sections.first}
|
||||
let(:first_card) {Style.cards.first}
|
||||
|
||||
it "has Style.sections" do
|
||||
expect(Style.sections.class).to be Hash
|
||||
expect(Style.sections.length).to be 6
|
||||
end
|
||||
it "has Style.cards" do
|
||||
expect(Style.cards.class).to be Hash
|
||||
expect(Style.cards.length).to be 1
|
||||
end
|
||||
it "Finds section by template" do
|
||||
spacer = Style.sections["section_spacer"]
|
||||
expect(spacer).not_to eq nil
|
||||
end
|
||||
it "Spacer has no fields" do
|
||||
spacer = Style.sections["section_spacer"]
|
||||
expect(spacer.fields).to be nil
|
||||
end
|
||||
it "2 col has fields" do
|
||||
spacer = Style.sections["section_cards"]
|
||||
expect(spacer.fields.class).to be Array
|
||||
expect(spacer.fields.length).to be 2
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user