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

Remove more deprecated features #508

Merged
merged 20 commits into from
Nov 12, 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
20 changes: 0 additions & 20 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@ task :default => :test
desc 'Run the whole test suite. Any failure will stop rake going on'
task :test => %w(lint:travis lint:coding_guidelines lint:licenses test:rspec test:cucumber test:cucumber_wip)

task :cucumber do
Aruba.platform.deprecated 'The use of task "cucumber" is deprecated. Please use "test:cucumber"'
Rake::Task['test:cucumber'].invoke
end

task :cucumber_wip do
Aruba.platform.deprecated 'The use of task "cucumber_wip" is deprecated. Please use "test:cucumber_wip"'
Rake::Task['test:cucumber_wip'].invoke
end

task :spec do
Aruba.platform.deprecated 'The use of task "spec" is deprecated. Please use "test:rspec"'
Rake::Task['test:rspec'].invoke
end

task :rubocop do
Aruba.platform.deprecated 'The use of task "rubocop" is deprecated. Please use "lint:coding_guidelines"'
Rake::Task['test:coding_guidelines'].invoke
end

require 'cucumber/rake/task'
require 'rspec/core/rake_task'

Expand Down
30 changes: 0 additions & 30 deletions features/02_configure_aruba/keep_ansi_escape_sequences.feature

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,6 @@ Feature: Announce output during test run
Background:
Given I use a fixture named "cli-app"

Scenario: Announce change of directory (deprecated)
Given a file named "features/exit_status.feature" with:
"""cucumber
Feature: Announce
@announce-dir
Scenario: Run command
Given a directory named "dir.d"
When I cd to "dir.d"
"""
When I run `cucumber`
Then the features should all pass
And the output should contain:
"""
$ cd /
"""
And the output should contain:
"""
tmp/aruba/dir.d
"""

Scenario: Announce change of directory
Given a file named "features/exit_status.feature" with:
"""cucumber
Expand Down Expand Up @@ -140,7 +120,7 @@ Feature: Announce output during test run
And a file named "features/exit_status.feature" with:
"""cucumber
Feature: Announce
@announce-cmd
@announce-command
Scenario: Run command
When I run `aruba-test-cli`
Then the exit status should be 0
Expand All @@ -162,7 +142,7 @@ Feature: Announce output during test run
And a file named "features/exit_status.feature" with:
"""cucumber
Feature: Announce
@announce-env
@announce-changed-environment
Scenario: Run command
When I set the environment variables to:
| variable | value |
Expand All @@ -187,7 +167,7 @@ Feature: Announce output during test run
And a file named "features/exit_status.feature" with:
"""cucumber
Feature: Announce
@announce-env
@announce-changed-environment
Scenario: Run command
When I set the environment variables to:
| variable | value |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,105 +213,6 @@ Feature: Run commands in ruby process
When I run `cucumber`
Then the features should all pass

Scenario: Set runner via "Aruba.process ="-method (deprecated)
Given a file named "features/support/in_proccess.rb" with:
"""
require 'aruba/cucumber'
require 'aruba/processes/in_process'

Before('@in-process') do
Aruba.process = Aruba::Processes::InProcess
Aruba.process.main_class = Cli::App::Runner
end

After('@in-process') do
Aruba.process = Aruba::Processes::SpawnProcess
end
"""
Given a file named "lib/cli/app/runner.rb" with:
"""
module Cli
module App
class Runner
def initialize(argv, stdin, stdout, stderr, kernel)
@argv = argv
@stdin = stdin
@stdout = stdout
@stderr = stderr
@kernel = kernel
end

def execute!
@stdout.puts(@argv.map(&:reverse).join(' '))
end
end
end
end
"""
And a file named "features/in_process.feature" with:
"""
Feature: Run a command in process
@in-process
Scenario: Run command
When I run `reverse.rb Hello World`
Then the output should contain:
\"\"\"
olleH dlroW
\"\"\"
"""
When I run `cucumber`
Then the features should all pass

Scenario: Set runner via "Aruba.process ="-method and use old class name Aruba::InProcess (deprecated)
Given a file named "features/support/in_proccess.rb" with:
"""
require 'aruba/cucumber'
require 'aruba/in_process'
require 'aruba/spawn_process'

Before('@in-process') do
Aruba.process = Aruba::InProcess
Aruba.process.main_class = Cli::App::Runner
end

After('@in-process') do
Aruba.process = Aruba::SpawnProcess
end
"""
Given a file named "lib/cli/app/runner.rb" with:
"""
module Cli
module App
class Runner
def initialize(argv, stdin, stdout, stderr, kernel)
@argv = argv
@stdin = stdin
@stdout = stdout
@stderr = stderr
@kernel = kernel
end

def execute!
@stdout.puts(@argv.map(&:reverse).join(' '))
end
end
end
end
"""
And a file named "features/in_process.feature" with:
"""
Feature: Run a command in process
@in-process
Scenario: Run command
When I run `reverse.rb Hello World`
Then the output should contain:
\"\"\"
olleH dlroW
\"\"\"
"""
When I run `cucumber`
Then the features should all pass

Scenario: Use $stderr, $stdout and $stdin to access IO

May may need/want to use the default `STDERR`, `STDOUT`, `STDIN`-constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,3 @@ Feature: before_cmd hooks
"""
before the run of `echo running`
"""

Scenario: Run a simple command with a "before(:cmd)"-hook (deprecated)
Given a file named "spec/support/hooks.rb" with:
"""
require_relative 'aruba'

Aruba.configure do |config|
config.before :cmd do |cmd|
puts "before the run of `#{cmd}`"
end
end
"""
And a file named "spec/hook_spec.rb" with:
"""
require 'spec_helper'

RSpec.describe 'Hooks', :type => :aruba do
before(:each) { run_command_and_stop 'echo running' }

it { expect(last_command_started.stdout.chomp).to eq 'running' }
end
"""
When I run `rspec`
Then the specs should all pass
And the output should contain:
"""
before the run of `echo running`
"""
Loading