Class: RSpec::Core::Notifications::SeedNotification
- Inherits:
-
Struct
- Object
- Struct
- RSpec::Core::Notifications::SeedNotification
- 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
-
#seed ⇒ Fixnum
the seed used to randomize ordering.
-
#used ⇒ Boolean
writeonly
whether the seed has been used or not.
Instance Method Summary collapse
-
#fully_formatted ⇒ String
The seed information fully formatted in the way that RSpec's built-in formatters emit.
-
#seed_used? ⇒ Boolean
Has the seed been used?.
Instance Attribute Details
#seed ⇒ Fixnum
the seed used to randomize ordering
271 272 273 |
# File 'lib/rspec/core/notifications.rb', line 271 def seed @seed end |
#used=(value) ⇒ Boolean
whether the seed has been used or not
271 272 273 |
# File 'lib/rspec/core/notifications.rb', line 271 def used=(value) @used = value end |
Instance Method Details
#fully_formatted ⇒ String
Returns The seed information fully formatted in the way that RSpec's built-in formatters emit.
282 283 284 |
# File 'lib/rspec/core/notifications.rb', line 282 def fully_formatted "\nRandomized with seed #{seed}\n" end |
#seed_used? ⇒ Boolean
Returns has the seed been used?.
275 276 277 |
# File 'lib/rspec/core/notifications.rb', line 275 def seed_used? !!used end |