has_configuration 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/has_configuration/configuration.rb +1 -0
- data/lib/version.rb +1 -1
- data/spec/{has_configuration → lib/has_configuration}/configuration_spec.rb +4 -2
- data/spec/{has_configuration_spec.rb → lib/has_configuration_spec.rb} +2 -3
- data/spec/spec_helper.rb +94 -10
- data/spec/support/rails_mock.rb +5 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebff0280281752c0b1556b9a3b78ff373ef3d5f9
|
4
|
+
data.tar.gz: af60528f4c04a911de41688962cf09e286e1a1d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0da42542ceb0db1259ae25374f8a81742d53983d31e7facebdda9496636bf1273dddf40a1aedb6a84b925719cc46591e69ffd15bb8de939f83295f20a390ce46
|
7
|
+
data.tar.gz: a73480c049c8520064fe58df406255e0f0070e85ef33975f65da5fd36ade95ddad7e4a60ebd0066fc8804d0a560bdca3d79810c0f9091e409aef221ede610902
|
data/lib/version.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
describe HasConfiguration do
|
1
|
+
RSpec.describe HasConfiguration do
|
4
2
|
|
5
3
|
context "when declared" do
|
6
4
|
|
7
5
|
before(:all) do
|
8
6
|
Dummy = Class.new do
|
7
|
+
require 'has_configuration'
|
9
8
|
has_configuration :file => 'spec/fixtures/class.yml'
|
10
9
|
end
|
11
10
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,21 +1,105 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
|
3
|
-
require 'has_configuration'
|
4
|
-
require 'has_configuration/configuration'
|
5
|
-
|
6
1
|
if RUBY_VERSION >= "1.9"
|
7
2
|
require 'coveralls'
|
8
3
|
Coveralls.wear!
|
9
4
|
end
|
10
5
|
|
6
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
7
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
8
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause this
|
9
|
+
# file to always be loaded, without a need to explicitly require it in any files.
|
10
|
+
#
|
11
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
12
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
13
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
14
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
15
|
+
# a separate helper file that requires the additional dependencies and performs
|
16
|
+
# the additional setup, and require it from the spec files that actually need it.
|
17
|
+
#
|
18
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
19
|
+
# users commonly want.
|
20
|
+
#
|
21
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
11
22
|
RSpec.configure do |config|
|
23
|
+
# rspec-expectations config goes here. You can use an alternate
|
24
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
25
|
+
# assertions if you prefer.
|
26
|
+
config.expect_with :rspec do |expectations|
|
27
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
28
|
+
# and `failure_message` of custom matchers include text for helper methods
|
29
|
+
# defined using `chain`, e.g.:
|
30
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
31
|
+
# # => "be bigger than 2 and smaller than 4"
|
32
|
+
# ...rather than:
|
33
|
+
# # => "be bigger than 2"
|
34
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
35
|
+
end
|
36
|
+
|
37
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
38
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
12
39
|
config.mock_with :rspec do |mocks|
|
40
|
+
# Enable only the newer, non-monkey-patching expect syntax.
|
41
|
+
# For more details, see:
|
42
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
43
|
+
mocks.syntax = :expect
|
44
|
+
|
45
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
46
|
+
# a real object. This is generally recommended, and will default to
|
47
|
+
# `true` in RSpec 4.
|
13
48
|
mocks.verify_partial_doubles = true
|
14
49
|
end
|
15
|
-
end
|
16
50
|
|
17
|
-
#
|
18
|
-
|
19
|
-
|
20
|
-
|
51
|
+
# rspec-expectations config goes here. You can use an alternate
|
52
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
53
|
+
# assertions if you prefer.
|
54
|
+
config.expect_with :rspec do |expectations|
|
55
|
+
# Enable only the newer, non-monkey-patching expect syntax.
|
56
|
+
# For more details, see:
|
57
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
58
|
+
expectations.syntax = :expect
|
59
|
+
end
|
60
|
+
|
61
|
+
# These two settings work together to allow you to limit a spec run
|
62
|
+
# to individual examples or groups you care about by tagging them with
|
63
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
64
|
+
# get run.
|
65
|
+
config.filter_run :focus
|
66
|
+
config.run_all_when_everything_filtered = true
|
67
|
+
|
68
|
+
# Limits the available syntax to the non-monkey patched syntax that is recommended.
|
69
|
+
# For more details, see:
|
70
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
71
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
72
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
73
|
+
config.disable_monkey_patching!
|
74
|
+
|
75
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
76
|
+
# be too noisy due to issues in dependencies.
|
77
|
+
config.warnings = true
|
78
|
+
|
79
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
80
|
+
# file, and it's useful to allow more verbose output when running an
|
81
|
+
# individual spec file.
|
82
|
+
if config.files_to_run.one?
|
83
|
+
# Use the documentation formatter for detailed output,
|
84
|
+
# unless a formatter has already been configured
|
85
|
+
# (e.g. via a command-line flag).
|
86
|
+
config.default_formatter = 'doc'
|
87
|
+
end
|
88
|
+
|
89
|
+
# Print the 10 slowest examples and example groups at the
|
90
|
+
# end of the spec run, to help surface which specs are running
|
91
|
+
# particularly slow.
|
92
|
+
config.profile_examples = 3
|
93
|
+
|
94
|
+
# Run specs in random order to surface order dependencies. If you find an
|
95
|
+
# order dependency and want to debug it, you can fix the order by providing
|
96
|
+
# the seed, which is printed after each run.
|
97
|
+
# --seed 1234
|
98
|
+
config.order = :random
|
99
|
+
|
100
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
101
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
102
|
+
# test failures related to randomization by passing the same `--seed` value
|
103
|
+
# as the one that triggered the failure.
|
104
|
+
Kernel.srand config.seed
|
21
105
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_configuration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Spickermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -82,9 +82,10 @@ files:
|
|
82
82
|
- spec/fixtures/with_defaults.yml
|
83
83
|
- spec/fixtures/with_erb.yml
|
84
84
|
- spec/fixtures/with_nested_attributes.yml
|
85
|
-
- spec/has_configuration/configuration_spec.rb
|
86
|
-
- spec/has_configuration_spec.rb
|
85
|
+
- spec/lib/has_configuration/configuration_spec.rb
|
86
|
+
- spec/lib/has_configuration_spec.rb
|
87
87
|
- spec/spec_helper.rb
|
88
|
+
- spec/support/rails_mock.rb
|
88
89
|
homepage: https://github.com/spickermann/has_configuration
|
89
90
|
licenses:
|
90
91
|
- MIT
|
@@ -92,7 +93,7 @@ metadata: {}
|
|
92
93
|
post_install_message:
|
93
94
|
rdoc_options: []
|
94
95
|
require_paths:
|
95
|
-
-
|
96
|
+
- lib
|
96
97
|
required_ruby_version: !ruby/object:Gem::Requirement
|
97
98
|
requirements:
|
98
99
|
- - ">="
|
@@ -105,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
106
|
version: '0'
|
106
107
|
requirements: []
|
107
108
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.4.5
|
109
110
|
signing_key:
|
110
111
|
specification_version: 4
|
111
112
|
summary: Simple configuration handling
|