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