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

Fix final OSX build failures #497

Merged
merged 6 commits into from
Sep 16, 2017
Merged
Show file tree
Hide file tree
Changes from 4 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
13 changes: 2 additions & 11 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'pry'
require 'aruba/console'

require 'aruba/api'

module Aruba
class MyConsole
include Aruba::Api
end
end

include Aruba
Pry.start MyConsole.new
Aruba::Console.new.start
8 changes: 4 additions & 4 deletions features/02_configure_aruba/home_directory.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Feature: Configure the home directory to be used with aruba
end
"""
When I successfully run `cucumber`
Then the output should contain:
Then the output should match:
"""
The default value is "/home/
The default value is "/.*/tmp/aruba"
"""

Scenario: Set to current working directory
Expand Down Expand Up @@ -56,9 +56,9 @@ Feature: Configure the home directory to be used with aruba
end
"""
Then I successfully run `cucumber`
Then the output should contain:
Then the output should match:
"""
The default value is "/home/
The default value is "/.*/tmp/aruba"
"""

Scenario: Set to some other path (deprecated)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Feature: Debug your command in cucumber-test-run
When I successfully run `cucumber`
Then the features should all pass

@requires-readline
Scenario: You can use a debug repl in your cli program

If you want to debug a strange error, which only occures in one of your
Expand Down
4 changes: 4 additions & 0 deletions features/06_use_aruba_cli/open_console.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Feature: Aruba Console
Background:
Given a mocked home directory

@requires-readline
Scenario: Start console
Given I run `aruba console` interactively
When I close the stdin stream
Expand All @@ -12,6 +13,7 @@ Feature: Aruba Console
"""

@unsupported-on-platform-java
@requires-readline
Scenario: Show help
Given I run `aruba console` interactively
And I type "aruba_help"
Expand All @@ -30,6 +32,7 @@ Feature: Aruba Console
"""

@unsupported-on-platform-java
@requires-readline
Scenario: Show methods
Given I run `aruba console` interactively
And I type "aruba_methods"
Expand All @@ -44,6 +47,7 @@ Feature: Aruba Console
"""

@unsupported-on-platform-java
@requires-readline
Scenario: Has history
Given I run `aruba console` interactively
And I type "aruba_methods"
Expand Down
2 changes: 1 addition & 1 deletion features/07_development_of_aruba/run-aruba-console.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Running the interactive "aruba" developer console

Scenario: Running aruba interactively

This starts a pry console with "aruba"'s api loaded.
This starts an IRB console with "aruba"'s api loaded.

When I run `bin/console` interactively
And I type "exit"
Expand Down
12 changes: 12 additions & 0 deletions features/step_definitions/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@
end
end

Before '@requires-readline' do
begin
require 'readline'
rescue LoadError
if Cucumber::VERSION < '2'
skip_invoke!
else
skip_this_scenario
end
end
end

Before '@unsupported-on-platform-unix' do |scenario|
# leave if not windows
next unless FFI::Platform.unix?
Expand Down