Sha256: 3b2e4adcb24533ad8dce2a164eaa05fd56f62a07bb10c7d4720750c844c74e82
Contents?: true
Size: 949 Bytes
Versions: 3
Compression:
Stored size: 949 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 (.+) (issues|violations)$/) do |what, _| executing_output = send(:"executing_#{what.gsub(' ', '_')}") step "the output should contain \"#{executing_output}\"" validation_output = send(:"#{what.gsub(' ', '_')}_output") validation_output.split("\n").each do |string| step "the output should 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
warder-0.1.9 | features/step_definitions/run_steps.rb |
warder-0.1.8 | features/step_definitions/run_steps.rb |
warder-0.1.7 | features/step_definitions/run_steps.rb |