Sha256: 177292fa8b8177487cec94e82f3e5fba63f8ecc22b34e52915864f729944533f

Contents?: true

Size: 594 Bytes

Versions: 7

Compression:

Stored size: 594 Bytes

Contents

module Test
  module Unit
    class TestCase
      @@pending_cases = []
      @@at_exit = false

      # Loosely based upon Jeremy McAnally's pending
      
      def pending(scenario, statement)
        @@pending_cases << [scenario, statement]
        print "P"
        
        @@at_exit ||= begin
          at_exit do
            puts "\nPending Cases:"
            @@pending_cases.each do |scenario, stmt|
              puts "#{stmt[:file]}:#{stmt[:line]}: Scenario '#{scenario.name}': #{stmt[:type]} '#{stmt[:text]}'"
            end
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
coulda-0.6.1 lib/coulda/pending.rb
coulda-0.6.0 lib/coulda/pending.rb
coulda-0.5.5 lib/coulda/pending.rb
coulda-0.5.3 lib/coulda/pending.rb
coulda-0.5.2 lib/coulda/pending.rb
coulda-0.5.1 lib/coulda/pending.rb
coulda-0.5.0 lib/coulda/pending.rb