Sha256: de614f3811308ffa91ce0c52b11a68ef1b870a9be7b7135bf13c1fa1e69145d5

Contents?: true

Size: 919 Bytes

Versions: 16

Compression:

Stored size: 919 Bytes

Contents

require File.dirname(__FILE__) << "/test_helper"

class ReporterTest < Test::Unit::TestCase
  
  include Fiveruns::Dash
  
  attr_reader :reporter

  context "Reporter" do

    setup do
      mock!
    end
    
    context "instance" do
      setup do
        @reporter = Reporter.new(@session)
      end
      should "start normally" do
        assert !@reporter.started?
        assert !@reporter.background?
        @reporter.start
        assert_kind_of Time, @reporter.started_at
        assert @reporter.started?
        assert @reporter.background?
        assert !@restarted
      end
      should "allow restart" do
        @reporter.start
        time = @reporter.started_at
        assert_kind_of Time, time
        assert !@restarted
        @reporter.start
        assert @restarted
        assert_equal time.to_f, @reporter.started_at.to_f
      end
    end

  end
  
  #######
  private
  #######
  

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fiveruns-dash-ruby-0.7.0 test/reporter_test.rb
fiveruns-dash-ruby-0.7.1 test/reporter_test.rb
fiveruns-dash-ruby-0.7.2 test/reporter_test.rb
fiveruns-dash-ruby-0.7.3 test/reporter_test.rb
fiveruns-dash-ruby-0.7.4 test/reporter_test.rb
fiveruns-dash-ruby-0.7.5 test/reporter_test.rb
fiveruns-dash-ruby-0.7.6 test/reporter_test.rb
fiveruns-dash-ruby-0.8.0 test/reporter_test.rb
fiveruns-dash-ruby-0.8.1 test/reporter_test.rb
fiveruns-dash-ruby-0.8.10 test/reporter_test.rb
fiveruns-dash-ruby-0.8.3 test/reporter_test.rb
fiveruns-dash-ruby-0.8.4 test/reporter_test.rb
fiveruns-dash-ruby-0.8.5 test/reporter_test.rb
fiveruns-dash-ruby-0.8.6 test/reporter_test.rb
fiveruns-dash-ruby-0.8.8 test/reporter_test.rb
fiveruns-dash-ruby-0.8.9 test/reporter_test.rb