features/steps/formatting_steps.rb in xcpretty-0.1.7 vs features/steps/formatting_steps.rb in xcpretty-0.1.8

- old
+ new

@@ -74,18 +74,26 @@ Given(/^there was a syntax error$/) do add_run_input SAMPLE_COMPILE_ERROR end +Given(/^there were warnings in the code$/) do + add_run_input SAMPLE_FORMAT_WARNING +end + Given(/^the linker has failed with undefined symbols$/) do add_run_input SAMPLE_UNDEFINED_SYMBOLS end Given(/^I have a pending test in my suite$/) do add_run_input SAMPLE_PENDING_KIWI_TEST end +Given(/^I have a measuring test in my suite$/) do + add_run_input SAMPLE_MEASURING_TEST +end + Given(/^I have a tiff file to validate$/) do add_run_input SAMPLE_TIFFUTIL end Given(/^I have a file to touch$/) do @@ -179,10 +187,18 @@ Then(/^I should see a yellow pending test icon$/) do run_output.should start_with(yellow("P")) end +Then(/^I should see a measuring test icon in ASCII$/) do + run_output.should start_with('T') +end + +Then(/^I should see a yellow measuring test icon$/) do + run_output.should start_with(yellow('T')) +end + Then(/^the final execution message should be (red|green)$/) do |color| last_line = run_output.lines.to_a.last last_line.should be_colored(color.to_sym) end @@ -233,13 +249,18 @@ Then(/^I should not see the name of the test group$/) do run_output.should_not include("RACTupleSpec") end Then(/^I should see a red error message$/) do - run_output.should include(red("⌦ " + SAMPLE_PODS_ERROR.gsub('error: ', ''))) + run_output.should include(red("⌦ " + SAMPLE_PODS_ERROR.gsub('error: ', ''))) end +Then(/^I should see a yellow warning message$/) do + run_output.should include("#{yellow('⚠️ ')}/Users/supermarin/code/oss/ObjectiveSugar/Example/ObjectiveSugar/AppDelegate.m:19:31:") + run_output.should include(yellow("format specifies type 'id' but the argument has type 'int' [-Wformat]")) +end + Then(/^I should see a red compilation error$/) do run_output.should include(red("expected identifier")) end Then(/^I should see a failed line$/) do @@ -249,19 +270,23 @@ Then(/^I should see a cyan cursor$/) do run_output.should include(cyan(" ^")) end Then(/^I should see the undefined symbold message$/) do - run_output.should include(red("⌦ Undefined symbols for architecture x86_64")) + run_output.should include(red("⌦ Undefined symbols for architecture x86_64")) end Then(/^I should see the symbol and reference that caused failure$/) do run_output.should include("_OBJC_CLASS_$_CABasicAnimation") run_output.should include("objc-class-ref in ATZRadialProgressControl.o") end Then(/^I should see the name of a pending test$/) do run_output.should =~ PENDING_TEST_NAME_MATCHER +end + +Then(/^I should see the name of a measuring test$/) do + run_output.should =~ MEASURING_TEST_NAME_MATCHER end Then(/^I should see the test time in yellow$/) do run_output.should include("#{yellow("0.026")}") end