To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorUsage with nested params example
- Background
-
- Given
-
a file named "Conffile" with:
system_config do google_analytics do code String, 'Enter your google analytics code here' => 'UA-12345678-1' multiple_domains String, 'has multiple domains?' domain String, 'your domain' => 'example.com' end end
- Given
-
a file named "my_app.rb" with:
require 'appsent' AppSent.init :path => 'config', :env => 'production' puts 'All stuff work!'
- Scenarios
-
- Nested parameters do not specified
- Nested parameters does not specified
- Some nested parameters are wrong type
- All right
- Nested parameters do not specified
-
- When
-
I write to "config/system_config.yml" with:
production: blabla
- And
-
I run
ruby my_app.rb
- Then
-
the output should contain:
wrong config file 'config/system_config.yml': 'production' entry should contain Hash
- When
-
I write to "config/system_config.yml" with:
production: blabla: blabla
- And
-
I run
ruby my_app.rb
- Then
-
the output should contain:
wrong config file 'config/system_config.yml': google_analytics: # does not exist, Hash
- Nested parameters does not specified
-
- When
-
I write to "config/system_config.yml" with:
production: google_analytics: blabla: blabla domain: example.com
- And
-
I run
ruby my_app.rb
- Then
-
the output should contain:
wrong config file 'config/system_config.yml': google_analytics: # wrong nested parameters code: UA-12345678-1 # does not exist(Enter your google analytics code here), String multiple_domains: # does not exist(has multiple domains?), String
- Some nested parameters are wrong type
-
- When
-
I write to "config/system_config.yml" with:
production: google_analytics: code: 100500 multiple_domains: false domain: gopa.sraka.com
- And
-
I run
ruby my_app.rb
- Then
-
the output should contain:
wrong config file 'config/system_config.yml': google_analytics: # wrong nested parameters code: 100500 # wrong type,should be String(Enter your google analytics code here)
- All right
-
- When
-
I write to "config/system_config.yml" with:
production: google_analytics: code: ZZ-31234123 multiple_domains: 'false' domain: gopa.sraka.com
- And
-
I run
ruby my_app.rb
- Then
-
the output should contain:
All stuff work!
Last published over 7 years ago by kucaahbe.