Sha256: 924f1d627f28d9dda6bff5bbd505ea11bd5ef8a19001930970cea6f3a367b043
Contents?: true
Size: 1010 Bytes
Versions: 30
Compression:
Stored size: 1010 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper' module Cucumber::Formatters describe AutotestFormatter do before(:each) do @io = StringIO.new @formatter = AutotestFormatter.new @io @scenario = mock('scenario', :name => "Doing tricky things") @step = mock('step', :scenario => @scenario) end %w{failed skipped pending}.each do |didnt_pass| it "should print a scenario's name when it has a #{didnt_pass} step" do @formatter.send("step_#{didnt_pass}".to_sym, @step, mock('regexp'), mock('args')) @io.string.should == "Doing tricky things\n" end end it "should not print the same scenario's name twice" do another_step = mock('another step', :scenario => @scenario) @formatter.send("step_failed".to_sym, @step, mock('regexp'), mock('args')) @formatter.send("step_skipped".to_sym, another_step, mock('regexp'), mock('args')) @io.string.should == "Doing tricky things\n" end end end
Version data entries
30 entries across 30 versions & 5 rubygems