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

Add helpful testing gems #1913

Merged
merged 1 commit into from
Sep 6, 2016
Merged

Add helpful testing gems #1913

merged 1 commit into from
Sep 6, 2016

Conversation

richmolj
Copy link
Contributor

@richmolj richmolj commented Sep 5, 2016

Adds gems m (run minitest by line numbers like rspec) and pry-byebug (for binding.pry support).

Addresses #1911 (comment)

@mention-bot
Copy link

@richmolj, thanks for your PR! By analyzing the annotation information on this pull request, we identified @bf4, @steveklabnik and @beauby to be potential reviewers

@richmolj richmolj force-pushed the test_gems branch 4 times, most recently from 869631e to 785c4a1 Compare September 5, 2016 21:48
@@ -9,6 +9,12 @@
STDERR.puts 'Running without SimpleCov'
end

begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you just require pry, it will load all pry plugins. This will lead to less churn if/when we add more pry configurations. I won't block if this doesn't seem interesting to you. It would require adding pry to the gemfile, then we could remove the rescue here since pry is all platforms

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure ill give that a shot

@@ -45,6 +45,8 @@ group :test do
gem 'sqlite3', platform: (@windows_platforms + [:ruby])
gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
gem 'codeclimate-test-reporter', require: false
gem 'm', '~> 1.5'
gem 'pry', '~> 0.10'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, put in pry-byebug as well, just limit it to valid platforms

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, duh, yes of course. updated, thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what advantage does adding pry provide? I thought pry-byebug included it.

@@ -9,6 +9,7 @@
STDERR.puts 'Running without SimpleCov'
end

require 'pry'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be require 'pry-byebug'?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually a great suggestion by @bf4 - if you require 'pry' it will load any pry plugins for you. So if you are non-MRI you will only get pry (works across rubies), if you are MRI you get pry-byebug as well (both specified in Gemfile).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neato

@bf4 bf4 merged commit f786558 into rails-api:master Sep 6, 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.

4 participants