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

Fix NoBrainer tests #228

Merged
merged 1 commit into from
May 5, 2016
Merged

Fix NoBrainer tests #228

merged 1 commit into from
May 5, 2016

Conversation

nviennot
Copy link
Contributor

@nviennot nviennot commented May 4, 2016

No description provided.

@gerrywastaken gerrywastaken merged commit a90f54c into awesome-print:master May 5, 2016
@gerrywastaken
Copy link
Contributor

Thank you. :)

@gerrywastaken
Copy link
Contributor

Oh despite those tests now passing on Travis, when I run rspec on local I get the following:

  3) AwesomePrint/NoBrainer should print class instance
     Failure/Error: NoBrainer.configure { |c| c.app_name = "ap_test" }

     URI::InvalidURIError:
       bad URI(is not URI?): rethinkdb://localhost/ap_test_{}
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/connection.rb:14:in `parse_uri'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/connection.rb:9:in `initialize'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:130:in `new'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:130:in `block in validate_urls'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:130:in `map'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:130:in `validate_urls'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:60:in `assert_valid_options'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:77:in `configure'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/nobrainer.rb:25:in `configure'
     # ./spec/ext/nobrainer_spec.rb:7:in `block (2 levels) in <top (required)>'

  4) AwesomePrint/NoBrainer should print the class
     Failure/Error: NoBrainer.configure { |c| c.app_name = "ap_test" }

     URI::InvalidURIError:
       bad URI(is not URI?): rethinkdb://localhost/ap_test_{}
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/connection.rb:14:in `parse_uri'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/connection.rb:9:in `initialize'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:130:in `new'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:130:in `block in validate_urls'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:130:in `map'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:130:in `validate_urls'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:60:in `assert_valid_options'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/no_brainer/config.rb:77:in `configure'
     # /Users/gerry/.gem/ruby/2.3.1/gems/nobrainer-0.31.0/lib/nobrainer.rb:25:in `configure'
     # ./spec/ext/nobrainer_spec.rb:7:in `block (2 levels) in <top (required)>'

Any clue about this? I'm still new to this project so it could be something related to not running the command via rake. But it's my suspicion that I should be able to run rspec directly and have these pass. Am I wrong about this?

@nviennot
Copy link
Contributor Author

nviennot commented May 5, 2016

Set the environment in addition to the app name, like: https://github.com/nviennot/kaminari-nobrainer/blob/master/spec/spec_helper.rb#L8-L11
This should work.
Sorry for having overlooked that.

@gerrywastaken
Copy link
Contributor

@nviennot Thanks for that, it worked.

gerrywastaken referenced this pull request in gerrywastaken/awesome_print May 5, 2016
This is to prevent it from trying to connect to localhost during
tests which causes errors shown here:
https://github.com/michaeldv/awesome_print/pull/228#issuecomment-217092622
@nviennot
Copy link
Contributor Author

nviennot commented May 5, 2016

awesome

@gerrywastaken
Copy link
Contributor

For posterity: this went live in version 1.7.0. Thank you for your work.

@nviennot
Copy link
Contributor Author

nviennot commented Jun 7, 2016

👍

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