Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Update aruba dependency #2609

Merged
merged 17 commits into from
Mar 24, 2019
Merged

Update aruba dependency #2609

merged 17 commits into from
Mar 24, 2019

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Mar 13, 2019

Updates Aruba to latest release (0.14.8 0.14.9) and fixes deprecations.

Incorporates a commit from the aruba_fix branch (5ce8240) and (parts of) commits from #2459.

An important criterion in reviewing this is whether the resulting code is acceptable: Many helper methods were deprecated in Aruba but perhaps some were actually very useful and should be restored.

mvz and others added 11 commits March 13, 2019 15:30
This gets both specs and features passing without deprecation warnings using Aruba 0.14.2, as discussed in rspec#2437.

Two caveats:
* There is a 1.0.0 pre-release version of Aruba, but it requires Cucumber 2, and that’s a whole different can of worms to open.
* The gemspec notes that Aruba 0.7 is broken on MRI 1.8.7. I’m not sure if 0.14 is happier, but perhaps Travis will tell us. If it’s not, I guess this change can’t be merged in until RSpec 4 is on the cards?
0.16 includes syntax that does not work with MRI 1.8.7. I don't believe rspec-core uses contracts directly, but it is a dependency of aruba.
@mvz mvz mentioned this pull request Mar 13, 2019
Copy link
Member

@JonRowe JonRowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No real problems with any of this, but we need some environment tweaks to get the build to pass it would seem.

@@ -24,8 +24,8 @@ Feature: fail if no examples

Scenario: Examples file name is not matched by RSpec pattern, thus there are no examples run
When I run `rspec`
Then it should fail with "0 examples, 0 failures"
Then it should fail with output "0 examples, 0 failures"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given a step change is required to make this happen, is it necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, no.

@@ -47,7 +47,8 @@ Gem::Specification.new do |s|

s.add_development_dependency "cucumber", "~> 1.3"
s.add_development_dependency "minitest", "~> 5.3"
s.add_development_dependency "aruba", "~> 0.6.2" # 0.7 is broken on ruby 1.8.7
s.add_development_dependency "aruba", "~> 0.14.8"
s.add_development_dependency "contracts", "< 0.16" # 0.16 does not work with Ruby 1.8.7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the extra dependency do?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aruba depends on contracts '~> 0.9', and apparently 0.16 is no good, but 0.15 is ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to move this to the Gemfile so the current ruby version can be checked.

@mvz
Copy link
Contributor Author

mvz commented Mar 17, 2019

The remaining test failures are due to a bug in Aruba. I'll go fix that first.

@mvz
Copy link
Contributor Author

mvz commented Mar 19, 2019

It looks like one appveyor test needs to be re-started.

@mvz
Copy link
Contributor Author

mvz commented Mar 19, 2019

All green!

@@ -4,19 +4,19 @@

Then /^the output should contain all of these:$/ do |table|
table.raw.flatten.each do |string|
assert_partial_output(string, all_output)
expect(all_commands.map { |c| c.output }.join("\n")).to include(string)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you feel about implementing all_output as this? It's repeated a lot and would reduce the churn, equally if you wanted to rename it I'd be ok with that I'm more concerned about the repetition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@JonRowe
Copy link
Member

JonRowe commented Mar 20, 2019

Great work, one last nit!

@JonRowe JonRowe merged commit 0b4c98d into rspec:master Mar 24, 2019
@JonRowe
Copy link
Member

JonRowe commented Mar 24, 2019

Thanks!

@mvz mvz deleted the update-aruba-dependency branch March 26, 2019 07:12
MatheusRich pushed a commit to MatheusRich/rspec-core that referenced this pull request Oct 30, 2020
* Depend on latest Aruba release
* Aruba has deprecated `in_current_directory` fix that
* Remove remaining use of in_current_dir
* Replace use of clean_current_dir with setup_aruba
* Remove use of deprecated #dirs method
* Replace #remove_file with #remove
* Replace #set_env with #set_environment_variable
* Replace call to #run_simple with #run_command_and_stop
* Remove custom fail-with-output step
* Remove custom pass-with-output step
* DRY up output checks by reintroducing all_output helper
yujinakayama pushed a commit to yujinakayama/rspec-monorepo that referenced this pull request Oct 6, 2021
* Depend on latest Aruba release
* Aruba has deprecated `in_current_directory` fix that
* Remove remaining use of in_current_dir
* Replace use of clean_current_dir with setup_aruba
* Remove use of deprecated #dirs method
* Replace #remove_file with #remove
* Replace #set_env with #set_environment_variable
* Replace call to #run_simple with #run_command_and_stop
* Remove custom fail-with-output step
* Remove custom pass-with-output step
* DRY up output checks by reintroducing all_output helper

---
This commit was imported from rspec/rspec-core@0b4c98d.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants