~concordion-dev/concordion-net/1.0

« back to all changes in this revision

Viewing changes to tools/Gallio-3.2.517.0/bin/RSpec/libs/rspec-1.2.7/examples/passing/options_formatter.rb

  • Committer: camejef
  • Date: 2010-09-12 12:44:48 UTC
  • Revision ID: jeffreycameron@gmail.com-20100912124448-j1y7sq07wh5d2s7q
Updated Concordion.NET to work with Gallio 3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This is an example of how you can use a custom formatter to do custom
 
2
# reporting. This formatter will only report example groups and examples that
 
3
# have :report => true (or anything truthy) in the declaration. See
 
4
# options_example.rb in this directory.  
 
5
 
 
6
require 'spec/runner/formatter/base_text_formatter'
 
7
 
 
8
class OptionsFormatter < Spec::Runner::Formatter::BaseTextFormatter
 
9
  def example_started(proxy)
 
10
    if proxy.options[:report]
 
11
      puts proxy.description
 
12
    end
 
13
  end
 
14
 
 
15
  def example_group_started(proxy)
 
16
    if proxy.options[:report]
 
17
      puts proxy.description
 
18
    end
 
19
  end
 
20
end