Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #179 Add tests for empty eyaml values #322

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pillarsdotnet
Copy link

@pillarsdotnet pillarsdotnet commented Jul 29, 2021

This PR only contains test changes for #179 and the tests should fail.

@pillarsdotnet
Copy link
Author

pillarsdotnet commented Jul 29, 2021

Unfortunately, when I run cucumber as directed, I get the following error:

cannot load such file -- aruba/config (LoadError)

I made the following change:

diff --git a/features/support/env.rb b/features/support/env.rb
index 1b3bfc9..5bb9b85 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -2,7 +2,7 @@ rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
 rubylib.unshift %|#{File.dirname(__FILE__) + '/../../lib'}|
 ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
 require 'rubygems'
-require 'aruba/config'
+require 'aruba/configuration'
 require 'aruba/cucumber'
 require 'fileutils'
 require 'pathname'

Then I ran cucumber again and got a new error:

undefined method `before_cmd' for #<Aruba::Configuration:0x00007fffb9053a00>
Did you mean?  before (NoMethodError)
   /home/rvincentii001/github/hiera-eyaml/features/support/env.rb:29:in `block in <top (required)>'

I made an additional change:

diff --git a/features/support/env.rb b/features/support/env.rb
index 5bb9b85..226bc38 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -26,7 +26,7 @@ end
 # ENV['EDITOR']="/bin/cat"

 Aruba.configure do |config|
-  config.before_cmd do |cmd|
+  config.before(:cmd) do |cmd|
     SetupSandbox.create_files test_files
     # when executing, resolve the SANDBOX_HOME into a real HOME
     ENV['HOME'] = Pathname.new(ENV['SANDBOX_HOME']).realpath.to_s

And this time the tests did run, but I got lots of unexpected No such file or directory errors.

@pillarsdotnet
Copy link
Author

pillarsdotnet commented Jul 29, 2021

@bastelfreak
Copy link
Member

I had to close and reopen the PR to trigger github actions

@pillarsdotnet
Copy link
Author

pillarsdotnet commented Aug 3, 2021

Tests should have failed. They passed, so either the added tests are inadequate, or the reported bug does not actually exist.

@pillarsdotnet pillarsdotnet marked this pull request as draft August 5, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants