spec/action_spec.rb in vagrant-shell-commander-0.3.0 vs spec/action_spec.rb in vagrant-shell-commander-0.3.1
- old
+ new
@@ -4,12 +4,13 @@
let(:app) {double(call: true)}
let(:machine) {double(action: true)}
let(:env) {double(:[] => machine)}
let(:cmd) {'cmd'}
let(:sh) {double(after_share_folders: cmd)}
- let(:global_config) {double(sh: sh)}
- let(:action_env) {{global_config: global_config}}
+ let(:config) {double(sh: sh)}
+ let(:machine_env) {double(config: config)}
+ let(:action_env) {{machine: machine_env}}
let(:subject) {described_class.new(app, env)}
describe "#call" do
it "should call the next middleware" do
expect(app).to receive(:call).with(action_env)
@@ -26,11 +27,12 @@
subject.call(action_env)
end
it "should not call SSHRun action if after_boot option is nil" do
sh = double(after_share_folders: nil)
- global_config = double(sh: sh)
- action_env = {global_config: global_config}
+ config = double(sh: sh)
+ machine_env = double(config: config)
+ action_env = {machine: machine_env}
expect(machine).not_to receive(:action)
subject.call(action_env)
end