Module: Osaka::OsakaExpectations

Defined in:
lib/osaka/osakaexpectations.rb

Instance Method Summary collapse

Instance Method Details

#expect_activateObject



18
19
20
# File 'lib/osaka/osakaexpectations.rb', line 18

def expect_activate
  control.should_receive(:activate)
end

#expect_click(location) ⇒ Object



80
81
82
# File 'lib/osaka/osakaexpectations.rb', line 80

def expect_click(location)
  control.should_receive(:click).with(location).and_return(control)
end

#expect_click!(location) ⇒ Object



76
77
78
# File 'lib/osaka/osakaexpectations.rb', line 76

def expect_click!(location)
  control.should_receive(:click!).with(location).and_return(control)
end

#expect_click_menu_bar(menu_item, menu_name) ⇒ Object



84
85
86
# File 'lib/osaka/osakaexpectations.rb', line 84

def expect_click_menu_bar(menu_item, menu_name)
  control.should_receive(:click_menu_bar).with(menu_item, menu_name).and_return(control)
end

#expect_cloneObject



14
15
16
# File 'lib/osaka/osakaexpectations.rb', line 14

def expect_clone
  control.should_receive(:clone)
end

#expect_current_window_nameObject



50
51
52
# File 'lib/osaka/osakaexpectations.rb', line 50

def expect_current_window_name
  control.should_receive(:current_window_name)
end

#expect_execute_osascript(command = nil) ⇒ Object



9
10
11
12
# File 'lib/osaka/osakaexpectations.rb', line 9

def expect_execute_osascript(command = nil)
  return Osaka::ScriptRunner.should_receive(:execute).with(command) unless command.nil?
  Osaka::ScriptRunner.should_receive(:execute)
end

#expect_exists?(location) ⇒ Boolean

Returns:

  • (Boolean)


104
105
106
# File 'lib/osaka/osakaexpectations.rb', line 104

def expect_exists?(location)
  control.should_receive(:exists?).with(location)
end

#expect_focusObject



26
27
28
# File 'lib/osaka/osakaexpectations.rb', line 26

def expect_focus
  control.should_receive(:focus)
end

#expect_focus!Object



30
31
32
# File 'lib/osaka/osakaexpectations.rb', line 30

def expect_focus!
  control.should_receive(:focus!)
end

#expect_get!(element, location) ⇒ Object



88
89
90
# File 'lib/osaka/osakaexpectations.rb', line 88

def expect_get!(element, location)
  control.should_receive(:get!).with(element, location)
end

#expect_get_app!(element) ⇒ Object



62
63
64
# File 'lib/osaka/osakaexpectations.rb', line 62

def expect_get_app!(element)
  control.should_receive(:get_app!).with(element)
end

#expect_keystroke(key, modifier = []) ⇒ Object



66
67
68
69
# File 'lib/osaka/osakaexpectations.rb', line 66

def expect_keystroke(key, modifier = [])
  control.should_receive(:keystroke).with(key, modifier).and_return(control) unless modifier.empty?
  control.should_receive(:keystroke).with(key).and_return(control) if modifier.empty?
end

#expect_keystroke!(key, modifier = []) ⇒ Object



71
72
73
74
# File 'lib/osaka/osakaexpectations.rb', line 71

def expect_keystroke!(key, modifier = [])
  control.should_receive(:keystroke!).with(key, modifier).and_return(control) unless modifier.empty?
  control.should_receive(:keystroke!).with(key).and_return(control) if modifier.empty?
end

#expect_launchObject



22
23
24
# File 'lib/osaka/osakaexpectations.rb', line 22

def expect_launch
  control.should_receive(:launch)
end

#expect_not_exists?(location) ⇒ Boolean

Returns:

  • (Boolean)


108
109
110
# File 'lib/osaka/osakaexpectations.rb', line 108

def expect_not_exists?(location)
  control.should_receive(:not_exists?).with(location)
end

#expect_quitObject



42
43
44
# File 'lib/osaka/osakaexpectations.rb', line 42

def expect_quit
  control.should_receive(:quit)
end

#expect_running?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/osaka/osakaexpectations.rb', line 38

def expect_running?
  control.should_receive(:running?)
end

#expect_set(element, location, value) ⇒ Object



54
55
56
# File 'lib/osaka/osakaexpectations.rb', line 54

def expect_set(element, location, value)
  control.should_receive(:set).with(element, location, value)
end

#expect_set!(element, location, value) ⇒ Object



58
59
60
# File 'lib/osaka/osakaexpectations.rb', line 58

def expect_set!(element, location, value)
  control.should_receive(:set!).with(element, location, value)
end

#expect_set_current_window(name) ⇒ Object



34
35
36
# File 'lib/osaka/osakaexpectations.rb', line 34

def expect_set_current_window(name)
  control.should_receive(:set_current_window).with(name)
end

#expect_system_event(event) ⇒ Object



96
97
98
# File 'lib/osaka/osakaexpectations.rb', line 96

def expect_system_event(event)
  control.should_receive(:system_event).with(event)
end

#expect_system_event!(event) ⇒ Object



100
101
102
# File 'lib/osaka/osakaexpectations.rb', line 100

def expect_system_event!(event)
  control.should_receive(:system_event!).with(event)
end

#expect_tell(do_this) ⇒ Object



92
93
94
# File 'lib/osaka/osakaexpectations.rb', line 92

def expect_tell(do_this)
  control.should_receive(:tell).with(do_this)
end

#expect_until_not_exists!(element) ⇒ Object



128
129
130
# File 'lib/osaka/osakaexpectations.rb', line 128

def expect_until_not_exists!(element)
  control.should_receive(:until_not_exists!).with(element).and_yield
end

#expect_wait_until_exists(*location) ⇒ Object



112
113
114
# File 'lib/osaka/osakaexpectations.rb', line 112

def expect_wait_until_exists(*location)
  control.should_receive(:wait_until_exists).with(*location)
end

#expect_wait_until_exists!(*location) ⇒ Object



116
117
118
# File 'lib/osaka/osakaexpectations.rb', line 116

def expect_wait_until_exists!(*location)
  control.should_receive(:wait_until_exists!).with(*location)
end

#expect_wait_until_not_exists(location) ⇒ Object



120
121
122
# File 'lib/osaka/osakaexpectations.rb', line 120

def expect_wait_until_not_exists(location)
  control.should_receive(:wait_until_not_exists).with(location)
end

#expect_wait_until_not_exists!(location, action) ⇒ Object



124
125
126
# File 'lib/osaka/osakaexpectations.rb', line 124

def expect_wait_until_not_exists!(location, action)
  control.should_receive(:wait_until_not_exists!).with(location)
end

#expect_window_listObject



46
47
48
# File 'lib/osaka/osakaexpectations.rb', line 46

def expect_window_list
  control.should_receive(:window_list)
end

#simulate_mac_version(version) ⇒ Object



5
6
7
# File 'lib/osaka/osakaexpectations.rb', line 5

def simulate_mac_version(version)
  control.should_receive(:mac_version).and_return(version)
end