core: update rspec, fix deprecations
This commit is contained in:
parent
ae4fa1a946
commit
1a51f42ee7
|
@ -21,7 +21,7 @@ module Vagrant
|
|||
# Go through each folder and do cleanup
|
||||
folders.each_key do |impl_name|
|
||||
@logger.info("Invoking synced folder cleanup for: #{impl_name}")
|
||||
plugins[impl_name.to_sym][0].new.cleanup(env)
|
||||
plugins[impl_name.to_sym][0].new.cleanup(env[:machine])
|
||||
end
|
||||
|
||||
@app.call(env)
|
||||
|
|
|
@ -2,8 +2,7 @@ require 'rake/testtask'
|
|||
require 'rspec/core/rake_task'
|
||||
|
||||
namespace :test do
|
||||
RSpec::Core::RakeTask.new do |t|
|
||||
t.name = "unit"
|
||||
RSpec::Core::RakeTask.new(:unit) do |t|
|
||||
t.pattern = "test/unit/**/*_test.rb"
|
||||
end
|
||||
|
||||
|
@ -13,8 +12,7 @@ namespace :test do
|
|||
t.pattern = "test/unit_legacy/**/*_test.rb"
|
||||
end
|
||||
|
||||
RSpec::Core::RakeTask.new do |t|
|
||||
t.name = "acceptance"
|
||||
RSpec::Core::RakeTask.new(:acceptance) do |t|
|
||||
t.pattern = "test/acceptance/**/*_test.rb"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -52,6 +52,7 @@ describe Vagrant::Action::Builtin::SyncedFolderCleanup do
|
|||
plugins[:default] = [impl(true, "default"), 10]
|
||||
plugins[:nfs] = [impl(true, "nfs"), 5]
|
||||
|
||||
env[:machine] = Object.new
|
||||
env[:root_path] = Pathname.new(Dir.mktmpdir)
|
||||
|
||||
subject.stub(:plugins => plugins)
|
||||
|
@ -73,8 +74,10 @@ describe Vagrant::Action::Builtin::SyncedFolderCleanup do
|
|||
}
|
||||
}
|
||||
|
||||
expect_any_instance_of(tracker).to receive(:cleanup).
|
||||
with(env[:machine])
|
||||
|
||||
subject.call(env)
|
||||
tracker.clean.should be_true
|
||||
end
|
||||
|
||||
it "should invoke cleanup once per implementation" do
|
||||
|
|
|
@ -311,7 +311,7 @@ describe Vagrant::Environment do
|
|||
|
||||
it "should allow passing in a custom action runner" do
|
||||
instance.action_runner.should_not_receive(:run)
|
||||
other_runner = mock
|
||||
other_runner = double("runner")
|
||||
other_runner.should_receive(:run).and_return(:foo)
|
||||
|
||||
instance.hook(:bar, runner: other_runner).should == :foo
|
||||
|
|
|
@ -27,9 +27,7 @@ Gem::Specification.new do |s|
|
|||
s.add_development_dependency "mocha"
|
||||
# This has problems on Windows, we need to find a better way:
|
||||
# s.add_development_dependency "sys-proctable", "~> 0.9.0"
|
||||
s.add_development_dependency "rspec-core", "~> 2.11.0"
|
||||
s.add_development_dependency "rspec-expectations", "~> 2.11.0"
|
||||
s.add_development_dependency "rspec-mocks", "~> 2.11.0"
|
||||
s.add_development_dependency "rspec", "~> 2.14.0"
|
||||
|
||||
# The following block of code determines the files that should be included
|
||||
# in the gem. It does this by reading all the files in the directory where
|
||||
|
|
Loading…
Reference in New Issue