diff --git a/.gitignore b/.gitignore index 8624f93..1bb1e05 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ bin *.gemfile.lock .ruby-version .ruby-gemset +.byebug_history diff --git a/rack-attack.gemspec b/rack-attack.gemspec index f446cd6..07f2931 100644 --- a/rack-attack.gemspec +++ b/rack-attack.gemspec @@ -41,4 +41,9 @@ Gem::Specification.new do |s| # # See https://github.com/guard/guard-minitest/pull/131 s.add_development_dependency 'guard' + + # byebug only works with MRI + if RUBY_ENGINE == "ruby" + s.add_development_dependency 'byebug' + end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0378797..7cfc1b5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -15,6 +15,10 @@ rescue LoadError #nothing to do here end +if RUBY_ENGINE == "ruby" + require "byebug" +end + class MiniTest::Spec include Rack::Test::Methods