Class: Spex::CreatedCheck
- Defined in:
- lib/spex/checks/created_check.rb
Instance Attribute Summary
Attributes inherited from Check
Instance Method Summary collapse
Methods inherited from FileCheck
Methods inherited from Check
[], #active?, as, each, example, examples, #initialize, option, options, #prepare, registry, #to_s, #validate!
Constructor Details
This class inherits a constructor from Spex::Check
Instance Method Details
#after ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/spex/checks/created_check.rb', line 16 def after if active? assert File.exist?(target), "File was not created at #{target}" check_type else assert !File.exist?(target), "File was created at #{target}" end end |
#before ⇒ Object
10 11 12 13 14 |
# File 'lib/spex/checks/created_check.rb', line 10 def before if active? assert !File.exist?(target), "File already exists at #{target}" end end |