Module: Integrity::Notifier::Test
- Defined in:
- lib/integrity/notifier/test.rb,
lib/integrity/notifier/test/hpricot_matcher.rb
Defined Under Namespace
Classes: HpricotMatcher
Instance Method Summary collapse
- #build(state = :successful) ⇒ Object
- #notifier_class ⇒ Object
- #provides_option?(option, value = nil) ⇒ Boolean
- #provides_options(*options) ⇒ Object
- #setup_database ⇒ Object
Instance Method Details
#build(state = :successful) ⇒ Object
14 15 16 |
# File 'lib/integrity/notifier/test.rb', line 14 def build(state=:successful) Integrity::Build.gen(state) end |
#notifier_class ⇒ Object
18 19 20 |
# File 'lib/integrity/notifier/test.rb', line 18 def notifier_class Integrity::Notifier.const_get(notifier) end |
#provides_option?(option, value = nil) ⇒ Boolean
22 23 24 25 26 27 28 |
# File 'lib/integrity/notifier/test.rb', line 22 def provides_option?(option, value=nil) selector = "input##{notifier.downcase}_notifier_#{option}" selector << "[@name='notifiers[#{notifier}][#{option}]']" selector << "[@value='#{value}']" if value form_have_tag?(selector, option => value) end |
#provides_options(*options) ⇒ Object
30 31 32 |
# File 'lib/integrity/notifier/test.rb', line 30 def (*) .each { |option| assert_form_have_option(option) } end |
#setup_database ⇒ Object
9 10 11 12 |
# File 'lib/integrity/notifier/test.rb', line 9 def setup_database DataMapper.setup(:default, "sqlite3::memory:") DataMapper.auto_migrate! end |