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



184
185
186
187
188
189
190
191
# File 'lib/assert2/rjs.rb', line 184

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



326
327
328
# File 'lib/assert2/xhtml.rb', line 326

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

#generate_js_to(*args, &block) ⇒ Object



197
198
199
# File 'lib/assert2/rjs.rb', line 197

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

#send_js_to(*args, &block) ⇒ Object

ERGO further merging!



193
194
195
# File 'lib/assert2/rjs.rb', line 193

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