Class: HtmlExpectationsHook

Inherits:
Mumukit::Hook
  • Object
show all
Defined in:
lib/expectations_hook.rb

Instance Method Summary collapse

Instance Method Details

#compile(request) ⇒ Object



2
3
4
# File 'lib/expectations_hook.rb', line 2

def compile(request)
  request
end

#run!(request) ⇒ Object



6
7
8
9
10
11
# File 'lib/expectations_hook.rb', line 6

def run!(request)
  document = Nokogiri::HTML(compile_content(request))
  request.expectations.map do |raw|
    evaluate_expectation raw, document
  end
end