Module: Spec::Matchers

Defined in:
lib/assert2/rjs.rb,
lib/assert2/xhtml.rb

Defined Under Namespace

Classes: SendJsTo

Instance Method Summary collapse

Instance Method Details

#__interpret_rjs(response, command, *args, &block) ⇒ Object



246
247
248
249
250
251
252
253
# File 'lib/assert2/rjs.rb', line 246

def __interpret_rjs(response, command, *args, &block)
  klass = command.to_s.upcase
  klass = eval("Test::Unit::Assertions::AssertRjs::#{klass}") rescue
    flunk("#{command} not implemented!")
  asserter = klass.new(response, command, self)
  sample = asserter.pwn(*args, &block)
  return sample, asserter
end

#be_html_with(&block) ⇒ Object



346
347
348
# File 'lib/assert2/xhtml.rb', line 346

def be_html_with(&block)
  BeHtmlWith.new(self, &block)
end

#generate_js_to(*args, &block) ⇒ Object



259
260
261
# File 'lib/assert2/rjs.rb', line 259

def generate_js_to(*args, &block)
  send_js_to(*args, &block)
end

#send_js_to(*args, &block) ⇒ Object

ERGO further merging!



255
256
257
# File 'lib/assert2/rjs.rb', line 255

def send_js_to(*args, &block)
  SendJsTo.new(self, *args, &block)
end