redhataccess / ascii_binder

AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.
https://asciibinder.net
MIT License
76 stars 39 forks source link

Fix tests master to main #161

Closed mikemckiernan closed 2 years ago

mikemckiernan commented 3 years ago

I wasn't able to run the tests without errors and had to add bigdecimal as a dependency and change the way that the Git module determined the current branch. If these are user error, please let me know.

For the dependency, this is the error that I otherwise face:

Scenario: A user wants to do a build in a repo with alias that points to a nonexistent topic # features/repo_build.featur
e:16                                                                                                                      
    Given a valid AsciiBinder docs repo with an invalid alias                                  # features/step_definitions/
steps.rb:15                                                                                                               
      ERROR: Could not initialize test repo.                                                                               
      STDOUT:          
      STDERR:                                                                                                              
      /project/vendor/bundle/ruby/2.7.0/gems/asciidoctor-diagram-2.0.5/lib/asciidoctor-diagram/util/svg.rb:3:in `require': 
cannot load such file -- bigdecimal (LoadError)                                                      

For the Git issue, this is the error message that I receive:

    Given a valid AsciiBinder docs repo with multiple distros                        # features/step_definitions/steps.rb:1
5   
    When the user runs `asciibinder build` on that repo directory                    # features/step_definitions/steps.rb:7
9                      
    Then the program generates preview content for all distros in the current branch # features/step_definitions/steps.rb:1
58                                                  
      ERROR: Build operation started on branch 'main' but ended on branch 'master'                                        
      exit (SystemExit)