Class: RSpec::Core::Notifications::SeedNotification

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec/core/notifications.rb,
lib/rspec/core/notifications.rb

Overview

The SeedNotification holds the seed used to randomize examples and whether that seed has been used or not.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#seedFixnum

the seed used to randomize ordering



407
408
409
# File 'lib/rspec/core/notifications.rb', line 407

def seed
  @seed
end

#used=(value) ⇒ Boolean

whether the seed has been used or not



407
408
409
# File 'lib/rspec/core/notifications.rb', line 407

def used=(value)
  @used = value
end

Instance Method Details

#fully_formattedString



418
419
420
# File 'lib/rspec/core/notifications.rb', line 418

def fully_formatted
  "\nRandomized with seed #{seed}\n"
end

#seed_used?Boolean

Returns has the seed been used?



411
412
413
# File 'lib/rspec/core/notifications.rb', line 411

def seed_used?
  !!used
end