123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: rspec-core/lib/rspec/core/notifications.rb,
rspec-core/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

  • #seed rw

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

  • #seed_used? ⇒ Boolean readonly
  • #used rw private

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

Instance Method Summary

Instance Attribute Details

#seed (rw)

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

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/notifications.rb', line 271

SeedNotification = Struct.new(:seed, :used)

#seed_used?Boolean (readonly)

Returns:

  • (Boolean)

    has the seed been used?

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/notifications.rb', line 275

def seed_used?
  !!used
end

#used (rw, private)

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

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/notifications.rb', line 271

SeedNotification = Struct.new(:seed, :used)

Instance Method Details

#fully_formattedString

Returns:

  • (String)

    The seed information fully formatted in the way that RSpec’s built-in formatters emit.

[ GitHub ]

  
# File 'rspec-core/lib/rspec/core/notifications.rb', line 282

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