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

Getting test failures for heroku_set_spec.rb #247

Open
TheNotary opened this issue Aug 23, 2016 · 2 comments
Open

Getting test failures for heroku_set_spec.rb #247

TheNotary opened this issue Aug 23, 2016 · 2 comments

Comments

@TheNotary
Copy link

I'm wondering if my system needs a little tweaking to get run_simple to work or if the tests are red for everyone because the tests are in an incomplete state.

$ rake

Randomized with seed 31481
...................................................FFFFFF................................

Failures:

  1) figaro heroku:set targets a specific Heroku git remote
     Failure/Error: expect(command.name).to eq("heroku")

     NoMethodError:
       undefined method `name' for nil:NilClass
     # ./spec/figaro/cli/heroku_set_spec.rb:53:in `block (2 levels) in <top (required)>'

  2) figaro heroku:set targets a specific Heroku app
     Failure/Error: expect(command.name).to eq("heroku")

     NoMethodError:
       undefined method `name' for nil:NilClass
     # ./spec/figaro/cli/heroku_set_spec.rb:44:in `block (2 levels) in <top (required)>'

  3) figaro heroku:set respects environment
     Failure/Error: expect(command.name).to eq("heroku")

     NoMethodError:
       undefined method `name' for nil:NilClass
     # ./spec/figaro/cli/heroku_set_spec.rb:36:in `block (2 levels) in <top (required)>'

  4) figaro heroku:set respects path
     Failure/Error: expect(command.name).to eq("heroku")

     NoMethodError:
       undefined method `name' for nil:NilClass
     # ./spec/figaro/cli/heroku_set_spec.rb:22:in `block (2 levels) in <top (required)>'

  5) figaro heroku:set sends Figaro configuration to Heroku
     Failure/Error: expect(command.name).to eq("heroku")

     NoMethodError:
       undefined method `name' for nil:NilClass
     # ./spec/figaro/cli/heroku_set_spec.rb:12:in `block (2 levels) in <top (required)>'

  6) figaro heroku:set handles values with special characters
     Failure/Error: expect(command.name).to eq("heroku")

     NoMethodError:
       undefined method `name' for nil:NilClass
     # ./spec/figaro/cli/heroku_set_spec.rb:64:in `block (2 levels) in <top (required)>'

Finished in 23.77 seconds (files took 0.37949 seconds to load)
89 examples, 6 failures

Failed examples:

rspec ./spec/figaro/cli/heroku_set_spec.rb:49 # figaro heroku:set targets a specific Heroku git remote
rspec ./spec/figaro/cli/heroku_set_spec.rb:40 # figaro heroku:set targets a specific Heroku app
rspec ./spec/figaro/cli/heroku_set_spec.rb:26 # figaro heroku:set respects environment
rspec ./spec/figaro/cli/heroku_set_spec.rb:16 # figaro heroku:set respects path
rspec ./spec/figaro/cli/heroku_set_spec.rb:8 # figaro heroku:set sends Figaro configuration to Heroku
rspec ./spec/figaro/cli/heroku_set_spec.rb:58 # figaro heroku:set handles values with special characters

Randomized with seed 31481
@bheim6
Copy link

bheim6 commented Jan 7, 2017

@TheNotary Rest assured, myself and a colleague are getting the same test failures that you are. We are currently looking into fixes for the heroku_set_spec. In regards to the "run_simple" command you mentioned, I am looking into that as well.

@bcgoss
Copy link

bcgoss commented Jan 8, 2017

@TheNotary as an experiment, add this to ./lib/figaro/cli/heroku_set.rb:

    class HerokuSet < Task
      def run
        raise system('which heroku').to_s #add this line please
        system(configuration, command)
      end

On my end, the first path object is pointing to /usr/local/bin/heroku. Based on the CommandInterceptor module, I think it should point to ./spec/support/bin/heroku so the problem is that Aruba is either using a different environment where it can find the real heroku or it's caching the location.

I had to use raise instead of a debugger like pry or byebug because Aruba is also running in a way where i can't interact with the debugger once we hit it.

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

No branches or pull requests

3 participants