File tree 3 files changed +33
-1
lines changed
spec/libraries/alchemy/configuration
3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 5
5
6
6
require "alchemy/configuration/boolean_option"
7
7
require "alchemy/configuration/collection_option"
8
+ require "alchemy/configuration/configuration_option"
8
9
require "alchemy/configuration/class_option"
9
10
require "alchemy/configuration/class_set_option"
10
11
require "alchemy/configuration/integer_option"
11
12
require "alchemy/configuration/regexp_option"
12
13
require "alchemy/configuration/string_option"
13
- require "alchemy/configuration/collection_option"
14
14
15
15
module Alchemy
16
16
class Configuration
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ # frozen_string_literal: true
4
+
5
+ require "alchemy/configuration/base_option"
6
+
7
+ module Alchemy
8
+ class Configuration
9
+ class ConfigurationOption < BaseOption
10
+ def self . value_class
11
+ Alchemy ::Configuration
12
+ end
13
+ end
14
+ end
15
+ end
Original file line number Diff line number Diff line change 40
40
it { is_expected . to contain_exactly ( String ) }
41
41
end
42
42
end
43
+
44
+ context "with an array of configurations" do
45
+ let ( :collection_class ) { Array }
46
+ let ( :item_type ) { :configuration }
47
+ let ( :value ) do
48
+ [
49
+ Alchemy ::Configurations ::Sitemap . new (
50
+ show_root : true ,
51
+ show_flag : false
52
+ )
53
+ ]
54
+ end
55
+
56
+ it "contains configurations" do
57
+ expect ( subject . value . first . show_root ) . to be true
58
+ end
59
+ end
43
60
end
You can’t perform that action at this time.
0 commit comments