Sha256: 1e88ba071af1130265a517742af6a7f3ad0a988c92353fb5307c9bbbb193b74e

Contents?: true

Size: 806 Bytes

Versions: 47

Compression:

Stored size: 806 Bytes

Contents

require_relative '../../lib/reek'
require_relative '../../lib/reek/cli/application'
require 'aruba/cucumber'
require 'active_support/core_ext/string/strip'

begin
  require 'pry-byebug'
rescue LoadError # rubocop:disable Lint/HandleExceptions
end

#
# Provides runner methods used in the cucumber steps.
#
class ReekWorld
  def reek(args)
    run_simple("reek --no-color #{args}", false)
  end

  def reek_with_pipe(stdin, args)
    run "reek --no-color #{args}"
    type(stdin)
    close_input
  end

  def rake(name, task_def)
    header = <<-EOS.strip_heredoc
      require 'reek/rake/task'

    EOS
    write_file 'Rakefile', header + task_def
    run_simple("rake #{name}", false)
  end
end

World do
  ReekWorld.new
end

Before do
  Aruba.configure do |config|
    config.exit_timeout = 30
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
reek-4.7.2 features/support/env.rb
reek-4.7.1 features/support/env.rb
reek-4.7.0 features/support/env.rb
reek-4.6.2 features/support/env.rb
reek-4.6.1 features/support/env.rb
reek-4.6.0 features/support/env.rb
reek-4.5.6 features/support/env.rb
reek-4.5.5 features/support/env.rb
reek-4.5.4 features/support/env.rb
reek-4.5.3 features/support/env.rb
reek-4.5.2 features/support/env.rb
reek-4.5.1 features/support/env.rb
reek-4.5.0 features/support/env.rb
reek-4.4.2 features/support/env.rb
reek-4.4.1 features/support/env.rb
reek-4.4.0 features/support/env.rb
reek-4.3.0 features/support/env.rb
reek-4.2.5 features/support/env.rb
reek-4.2.4 features/support/env.rb
reek-4.2.3 features/support/env.rb