Skip to content

Instantly share code, notes, and snippets.

@alanszp
alanszp / method_observer.rb
Created October 16, 2013 19:42
Codigo para reemplzar el send... No funciona bien todavia
class MethodObserver
attr_reader :aspects
def self.get_instance
@instance == nil ? @instance = new : @instance
end
private
def initialize
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

Standard bindings

  • Move left between words: ⌥← | send escape sequence | b
  • Move right between words: ⌥→ | send escapes sequence | f
  • Start of the line: ⌘← | send escape sequence | [H
  • End of the line ⌘→ | send escape sequence | [F
  • Delete previous word ⌥←Delete | send hex code | 0x1B 0x08
  • Delete entire line ⌘←Delete | send hex code | 0x15

Don't forget the amazing icons ⌘ = command and ⌥ = options/alt (why oh why?).