virtualbox 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module VirtualBox
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
 
4
4
  module Version
5
5
  # Returns a boolean denoting whether the current VirtualBox
data/lib/virtualbox/vm.rb CHANGED
@@ -523,12 +523,7 @@ module VirtualBox
523
523
  #
524
524
  # @return [Boolean] True if command was successful, false otherwise.
525
525
  def discard_state
526
- # Since the VM should be saved as it is, we don't open an
527
- # existing session like the other control methods. We open a new
528
- # session.
529
- with_open_session do |session|
530
- session.console.forget_saved_state(true)
531
- end
526
+ control(:discard_saved_state, true)
532
527
  end
533
528
 
534
529
  # Controls the virtual machine. This method is used by {#stop},
@@ -321,7 +321,8 @@ class VMTest < Test::Unit::TestCase
321
321
  :stop => :power_down,
322
322
  :pause => :pause,
323
323
  :resume => :resume,
324
- :save_state => :save_state
324
+ :save_state => :save_state,
325
+ :discard_state => [:discard_saved_state, true]
325
326
  }
326
327
 
327
328
  methods.each do |method, control|
@@ -330,21 +331,6 @@ class VMTest < Test::Unit::TestCase
330
331
  @instance.send(method)
331
332
  end
332
333
  end
333
-
334
- context "discard state" do
335
- setup do
336
- @session = mock("session")
337
- @console = mock("console")
338
- @session.stubs(:console).returns(@console)
339
- @instance.stubs(:with_open_session)
340
- end
341
-
342
- should "discard the session in an open state" do
343
- @instance.expects(:with_open_session).yields(@session)
344
- @console.expects(:forget_saved_state).with(true).once
345
- @instance.discard_state
346
- end
347
- end
348
334
  end
349
335
 
350
336
  context "saving" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 2
9
- version: 0.8.2
8
+ - 3
9
+ version: 0.8.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mitchell Hashimoto
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-16 00:00:00 -08:00
17
+ date: 2011-01-28 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -435,7 +435,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
435
435
  requirements:
436
436
  - - ">="
437
437
  - !ruby/object:Gem::Version
438
- hash: 4340137299598754492
438
+ hash: 3085819186325211373
439
439
  segments:
440
440
  - 0
441
441
  version: "0"