Sha256: fa051751856f0178bf1ecdd95604f5578876ebd23de7ede97a5fddb06775f8cd

Contents?: true

Size: 1.43 KB

Versions: 17

Compression:

Stored size: 1.43 KB

Contents

require_relative '../../samples/paths'

Given(/^the smelly file '(.+)'$/) do |filename|
  write_file(filename, SAMPLES_PATH.join(filename).read)
end

Given(/^the clean file 'clean.rb'$/) do
  write_file('clean.rb', CLEAN_FILE.read)
end

Given(/^a directory called 'clean' containing two clean files$/) do
  contents = CLEAN_FILE.read

  write_file('clean/clean_one.rb', contents)
  write_file('clean/clean_two.rb', contents)
end

Given(/^a directory called 'mixed_files' containing some clean and smelly files$/) do
  write_file('mixed_files/clean.rb', CLEAN_FILE.read)
  write_file('mixed_files/dirty.rb', SMELLY_FILE.read)
end

Given(/^a directory called 'smelly' containing two smelly files$/) do
  contents = SMELLY_FILE.read

  write_file('smelly/dirty_one.rb', contents)
  write_file('smelly/dirty_two.rb', contents)
end

Given(/^the smelly file '(.+)' in a subdirectory$/) do |filename|
  contents = SAMPLES_PATH.join(filename).read

  write_file("subdir/#{filename}", contents)
end

Given(/^a configuration file '(.+)'$/) do |filename|
  write_file(filename, CONFIG_PATH.join(filename).read)
end

When(/^I run "reek (.*?)" in a subdirectory$/) do |args|
  cd 'subdir'

  reek(args)
end

Given(/^a configuration file '(.+)' in a subdirectory$/) do |filename|
  contents = CONFIG_PATH.join(filename).read

  write_file("subdir/#{filename}", contents)
end

Then(/^it does not report private or protected methods$/) do
  # Pseudo step for feature clarity.
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
reek-4.8.2 features/step_definitions/sample_file_steps.rb
reek-4.8.1 features/step_definitions/sample_file_steps.rb
reek-4.8.0 features/step_definitions/sample_file_steps.rb
reek-4.7.3 features/step_definitions/sample_file_steps.rb
reek-4.7.2 features/step_definitions/sample_file_steps.rb
reek-4.7.1 features/step_definitions/sample_file_steps.rb
reek-4.7.0 features/step_definitions/sample_file_steps.rb
reek-4.6.2 features/step_definitions/sample_file_steps.rb
reek-4.6.1 features/step_definitions/sample_file_steps.rb
reek-4.6.0 features/step_definitions/sample_file_steps.rb
reek-4.5.6 features/step_definitions/sample_file_steps.rb
reek-4.5.5 features/step_definitions/sample_file_steps.rb
reek-4.5.4 features/step_definitions/sample_file_steps.rb
reek-4.5.3 features/step_definitions/sample_file_steps.rb
reek-4.5.2 features/step_definitions/sample_file_steps.rb
reek-4.5.1 features/step_definitions/sample_file_steps.rb
reek-4.5.0 features/step_definitions/sample_file_steps.rb