Module: Osaka::OsakaExpectations
- Defined in:
- lib/osaka/osakaexpectations.rb
Instance Method Summary collapse
- #expect_activate ⇒ Object
- #expect_click(location) ⇒ Object
- #expect_click!(location) ⇒ Object
- #expect_click_menu_bar(menu_item, menu_name) ⇒ Object
- #expect_clone ⇒ Object
- #expect_current_window_name ⇒ Object
- #expect_execute_osascript(command = nil) ⇒ Object
- #expect_exists?(location) ⇒ Boolean
- #expect_focus ⇒ Object
- #expect_focus! ⇒ Object
- #expect_get!(element, location) ⇒ Object
- #expect_get_app!(element) ⇒ Object
- #expect_keystroke(key, modifier = []) ⇒ Object
- #expect_keystroke!(key, modifier = []) ⇒ Object
- #expect_launch ⇒ Object
- #expect_not_exists?(location) ⇒ Boolean
- #expect_quit ⇒ Object
- #expect_running? ⇒ Boolean
- #expect_set(element, location, value) ⇒ Object
- #expect_set!(element, location, value) ⇒ Object
- #expect_set_current_window(name) ⇒ Object
- #expect_system_event(event) ⇒ Object
- #expect_system_event!(event) ⇒ Object
- #expect_tell(do_this) ⇒ Object
- #expect_until_not_exists!(element) ⇒ Object
- #expect_wait_until_exists(*location) ⇒ Object
- #expect_wait_until_exists!(*location) ⇒ Object
- #expect_wait_until_not_exists(location) ⇒ Object
- #expect_wait_until_not_exists!(location, action) ⇒ Object
- #expect_window_list ⇒ Object
- #simulate_mac_version(version) ⇒ Object
Instance Method Details
#expect_activate ⇒ Object
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 (, ) control.should_receive(:click_menu_bar).with(, ).and_return(control) end |
#expect_clone ⇒ Object
14 15 16 |
# File 'lib/osaka/osakaexpectations.rb', line 14 def expect_clone control.should_receive(:clone) end |
#expect_current_window_name ⇒ Object
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
104 105 106 |
# File 'lib/osaka/osakaexpectations.rb', line 104 def expect_exists?(location) control.should_receive(:exists?).with(location) end |
#expect_focus ⇒ Object
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_launch ⇒ Object
22 23 24 |
# File 'lib/osaka/osakaexpectations.rb', line 22 def expect_launch control.should_receive(:launch) end |
#expect_not_exists?(location) ⇒ 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_quit ⇒ Object
42 43 44 |
# File 'lib/osaka/osakaexpectations.rb', line 42 def expect_quit control.should_receive(:quit) end |
#expect_running? ⇒ 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_list ⇒ Object
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 |