envied 0.9.3 → 0.10.0.alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +0,0 @@
1
- require "open3"
2
-
3
- RSpec.describe 'envied.gemspec' do
4
- let!(:build) { Open3.capture3("gem build envied.gemspec") }
5
-
6
- after do
7
- Dir.glob("envied-*.gem").each { |f| File.delete(f) }
8
- end
9
-
10
- it 'builds without warnings' do
11
- expect(build[1]).to_not match(/WARNING/)
12
- end
13
-
14
- it 'builds successfully' do
15
- expect(build[2].success?).to eq true
16
- end
17
- end
@@ -1,74 +0,0 @@
1
- require "bundler/setup"
2
- require "envied"
3
-
4
- RSpec.configure do |config|
5
- # rspec-expectations config goes here. You can use an alternate
6
- # assertion/expectation library such as wrong or the stdlib/minitest
7
- # assertions if you prefer.
8
- config.expect_with :rspec do |expectations|
9
- # This option will default to `true` in RSpec 4. It makes the `description`
10
- # and `failure_message` of custom matchers include text for helper methods
11
- # defined using `chain`, e.g.:
12
- # be_bigger_than(2).and_smaller_than(4).description
13
- # # => "be bigger than 2 and smaller than 4"
14
- # ...rather than:
15
- # # => "be bigger than 2"
16
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
17
- end
18
-
19
- # rspec-mocks config goes here. You can use an alternate test double
20
- # library (such as bogus or mocha) by changing the `mock_with` option here.
21
- config.mock_with :rspec do |mocks|
22
- # Prevents you from mocking or stubbing a method that does not exist on
23
- # a real object. This is generally recommended, and will default to
24
- # `true` in RSpec 4.
25
- mocks.verify_partial_doubles = true
26
- end
27
-
28
- # These two settings work together to allow you to limit a spec run
29
- # to individual examples or groups you care about by tagging them with
30
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
31
- # get run.
32
- # config.filter_run :focus
33
- # config.run_all_when_everything_filtered = true
34
-
35
- # Allows RSpec to persist some state between runs in order to support
36
- # the `--only-failures` and `--next-failure` CLI options. We recommend
37
- # you configure your source control system to ignore this file.
38
- config.example_status_persistence_file_path = "spec/examples.txt"
39
-
40
- # Limits the available syntax to the non-monkey patched syntax that is
41
- # recommended. For more details, see:
42
- # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
43
- # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
44
- # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
45
- config.disable_monkey_patching!
46
-
47
- # Many RSpec users commonly either run the entire suite or an individual
48
- # file, and it's useful to allow more verbose output when running an
49
- # individual spec file.
50
- if config.files_to_run.one?
51
- # Use the documentation formatter for detailed output,
52
- # unless a formatter has already been configured
53
- # (e.g. via a command-line flag).
54
- config.default_formatter = 'doc'
55
- end
56
-
57
- # Print the 10 slowest examples and example groups at the
58
- # end of the spec run, to help surface which specs are running
59
- # particularly slow.
60
- # config.profile_examples = 10
61
-
62
- # Run specs in random order to surface order dependencies. If you find an
63
- # order dependency and want to debug it, you can fix the order by providing
64
- # the seed, which is printed after each run.
65
- # --seed 1234
66
- config.order = :random
67
-
68
- # Seed global randomization in this process using the `--seed` CLI option.
69
- # Setting this allows you to use `--seed` to deterministically reproduce
70
- # test failures related to randomization by passing the same `--seed` value
71
- # as the one that triggered the failure.
72
- Kernel.srand config.seed
73
-
74
- end
@@ -1,25 +0,0 @@
1
- RSpec.describe ENVied::Variable do
2
- def variable(*args)
3
- described_class.new(*args)
4
- end
5
-
6
- describe 'an instance' do
7
- subject { variable(:A, :string) }
8
- it { is_expected.to respond_to :name }
9
- it { is_expected.to respond_to :type }
10
- it { is_expected.to respond_to :group }
11
- it { is_expected.to respond_to :default }
12
- it { is_expected.to respond_to :== }
13
- it { is_expected.to respond_to :default_value }
14
- end
15
-
16
- describe 'defaults' do
17
- it 'returns the default value as it is' do
18
- expect(variable(:A, :string, default: 'A').default_value).to eq 'A'
19
- end
20
-
21
- it 'returns the default value from calling the proc provided' do
22
- expect(variable(:A, :string, default: ->{ 'A' * 2 }).default_value).to eq 'AA'
23
- end
24
- end
25
- end