Sha256: 4f94e1a3b15e0f3bb1094b30c6b3f360463761d6d3c1d30bcdb14de41284884f
Contents?: true
Size: 989 Bytes
Versions: 4
Compression:
Stored size: 989 Bytes
Contents
Before do FileUtils.mkdir_p 'tmp/aruba' end After do FileUtils.rm_rf 'tmp/aruba' end Given(/^I have (\w+) file in directory$/) do |name| @filename = "#{name}.rb" FileUtils.ln_s "../../spec/fixtures/#{@filename}", 'tmp/aruba/' expect(`ls tmp/aruba`).to match(@filename) end Then(/^warder does nothing$/) do step 'the output should match /.{0}/' end Then(/^warder detects( no)? (.+) (issues|violations)$/) do |no, what, _| executing_output = send(:"executing_#{what.gsub(' ', '_')}") step "the output should#{' not' if no} contain \"#{executing_output}\"" validation_output = send(:"#{what.gsub(' ', '_')}_output") validation_output.split("\n").each do |string| step "the output should#{' not' if no} contain \"#{string}\"" end end def command_output_for_project_or_file(cmd) if @filename `cd spec/fixtures/ && #{cmd} ./#{@filename}` elsif @projectname `cd spec/fixtures/#{@projectname} && #{cmd} ./` else fail NotImplementedError end end
Version data entries
4 entries across 4 versions & 1 rubygems