Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rspec run all specs #441

Merged
merged 4 commits into from
Jul 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/aruba/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
require 'aruba/api/core'
require 'aruba/api/command'

if Aruba::VERSION <= '1.0.0'
if Aruba::VERSION <= '1.1.0'
require 'aruba/api/deprecated'
end

Expand All @@ -28,7 +28,9 @@ module Api
include Aruba::Api::Environment
include Aruba::Api::Filesystem
include Aruba::Api::Rvm
include Aruba::Api::Deprecated
if Aruba::VERSION <= '1.1.0'
include Aruba::Api::Deprecated
end
include Aruba::Api::Text
end
end
6 changes: 1 addition & 5 deletions lib/aruba/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ def initialize(opts = {})

@environment.update(@config.command_runtime_environment)

@command_monitor = if Aruba::VERSION < '1'
opts.fetch(:command_monitor, Aruba.platform.command_monitor.new(:announcer => @announcer))
else
opts.fetch(:command_monitor, Aruba.platform.command_monitor.new)
end
@command_monitor = opts.fetch(:command_monitor, Aruba.platform.command_monitor.new(:announcer => @announcer))

@logger = opts.fetch(:logger, Aruba.platform.logger.new)
@logger.mode = @config.log_level
Expand Down
12 changes: 6 additions & 6 deletions spec/aruba/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,8 @@ def actual_permissions
end
end

describe '#run' do
before(:each){ @aruba.run 'cat' }
describe '#run_command' do
before(:each){ @aruba.run_command 'cat' }
after(:each) { @aruba.all_commands.each(&:stop) }

it "respond to input" do
Expand Down Expand Up @@ -1178,14 +1178,14 @@ def root_directory

it "set environment variable" do
@aruba.set_env 'LONG_LONG_ENV_VARIABLE', 'true'
@aruba.run "env"
@aruba.run_command "env"
expect(@aruba.all_output).to include("LONG_LONG_ENV_VARIABLE=true")
end

it "overwrites environment variable" do
@aruba.set_env 'LONG_LONG_ENV_VARIABLE', 'true'
@aruba.set_env 'LONG_LONG_ENV_VARIABLE', 'false'
@aruba.run "env"
@aruba.run_command "env"
expect(@aruba.all_output).to include("LONG_LONG_ENV_VARIABLE=false")
end
end
Expand All @@ -1195,14 +1195,14 @@ def root_directory
it "restores environment variable" do
@aruba.set_env 'LONG_LONG_ENV_VARIABLE', 'true'
@aruba.restore_env
@aruba.run "env"
@aruba.run_command "env"
expect(@aruba.all_output).not_to include("LONG_LONG_ENV_VARIABLE")
end
it "restores environment variable that has been set multiple times" do
@aruba.set_env 'LONG_LONG_ENV_VARIABLE', 'true'
@aruba.set_env 'LONG_LONG_ENV_VARIABLE', 'false'
@aruba.restore_env
@aruba.run "env"
@aruba.run_command "env"
expect(@aruba.all_output).not_to include("LONG_LONG_ENV_VARIABLE")
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/aruba/hooks_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'spec_helper'
require 'aruba/config'

describe Aruba::Hooks do
Expand Down
1 change: 1 addition & 0 deletions spec/aruba/processes/basic_process_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'spec_helper'
require 'aruba/processes/basic_process'

RSpec.describe Aruba::Processes::BasicProcess do
Expand Down
1 change: 1 addition & 0 deletions spec/aruba/spawn_process_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'spec_helper'
require 'aruba/processes/spawn_process'

RSpec.describe Aruba::Processes::SpawnProcess do
Expand Down
1 change: 1 addition & 0 deletions spec/event_bus/name_resolver_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'spec_helper'
require 'aruba/event_bus/name_resolver'

describe Aruba::EventBus::NameResolver do
Expand Down
1 change: 1 addition & 0 deletions spec/event_bus_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'spec_helper'
require 'aruba/event_bus'

# rubocop:disable Style/Documentation
Expand Down