Module: TimelineFu::Macros
- Defined in:
- lib/timeline_fu/macros.rb
Instance Method Summary collapse
- #should_fire_event(event_type, opts = {}) ⇒ Object
- #should_not_fire_event(event_type, opts = {}) ⇒ Object
Instance Method Details
#should_fire_event(event_type, opts = {}) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/timeline_fu/macros.rb', line 3 def should_fire_event(event_type, opts = {}) should "fire #{event_type} on #{opts[:on]}" do matcher = fire_event(event_type, opts) assert_accepts matcher, self.class.name.gsub(/Test$/, '').constantize end end |
#should_not_fire_event(event_type, opts = {}) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/timeline_fu/macros.rb', line 11 def should_not_fire_event(event_type, opts = {}) should "fire #{event_type} on #{opts[:on]}" do matcher = fire_event(event_type, opts) assert_rejects matcher, self.class.name.gsub(/Test$/, '').constantize end end |