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

Updates from rspec-dev (2016-07-14) #2293

Merged
merged 5 commits into from
Jul 19, 2016
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
2 changes: 1 addition & 1 deletion .rubocop_rspec_base.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2016-06-14T22:22:14-07:00 from the rspec-dev repo.
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# This file contains defaults for RSpec projects. Individual projects
Expand Down
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2016-06-14T22:22:14-07:00 from the rspec-dev repo.
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

language: ruby
Expand All @@ -22,6 +22,7 @@ rvm:
- 2.1
- 2.2.5
- 2.3.1
- 2.4.0-preview1
- ruby-head
- ree
- rbx
Expand All @@ -35,11 +36,14 @@ matrix:
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
- rvm: jruby
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
- rvm: jruby-9.1.2.0
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
allow_failures:
- rvm: jruby-head
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
- rvm: ruby-head
- rvm: rbx
- rvm: 2.4.0-preview1
fast_finish: true
branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2016-06-14T22:22:14-07:00 from the rspec-dev repo.
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

version: "{build}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Feature: Excluding lines from the backtrace
And the output should contain "lib/rspec/expectations"
And the output should contain "lib/rspec/core"

@broken-on-jruby-9000
Scenario: Using `filter_gems_from_backtrace` to filter the named gem
Given a vendored gem named "my_gem" containing a file named "lib/my_gem.rb" with:
"""ruby
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Feature: configure expectation framework
"""
And the output should contain "3 examples, 1 failure"

@broken-on-jruby-9000
Scenario: Configure minitest assertions
Given rspec-expectations is not installed
And a file named "example_spec.rb" with:
Expand Down
4 changes: 4 additions & 0 deletions features/support/jruby.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Around "@broken-on-jruby-9000" do |scenario, block|
require 'rspec/support/ruby_features'
block.call unless RSpec::Support::Ruby.jruby_9000?
end
2 changes: 1 addition & 1 deletion script/clone_all_rspec_repos
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2016-06-14T22:22:14-07:00 from the rspec-dev repo.
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down
4 changes: 2 additions & 2 deletions script/functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2016-06-14T22:22:14-07:00 from the rspec-dev repo.
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down Expand Up @@ -28,7 +28,7 @@ function run_specs_and_record_done {

# rspec-core needs to run with a special script that loads simplecov first,
# so that it can instrument rspec-core's code before rspec-core has been loaded.
if [ -f script/rspec_with_simplecov ]; then
if [ -f script/rspec_with_simplecov ] && is_mri; then
Copy link
Member

Choose a reason for hiding this comment

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

Does simplecov not work on JRuby anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure we've ever tried to run it before, our other JRuby modes report themselves as < 2 so miss this anyway, but rspec-core is reporting 0% coverage on JRuby 9.1.50

rspec_bin=script/rspec_with_simplecov
fi;

Expand Down
2 changes: 1 addition & 1 deletion script/predicate_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2016-06-14T22:22:14-07:00 from the rspec-dev repo.
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

function is_mri {
Expand Down
2 changes: 1 addition & 1 deletion script/run_build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2016-06-14T22:22:14-07:00 from the rspec-dev repo.
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down
2 changes: 1 addition & 1 deletion script/travis_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2016-06-14T22:22:14-07:00 from the rspec-dev repo.
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# Taken from:
Expand Down
6 changes: 3 additions & 3 deletions spec/integration/failed_line_detection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
expect(last_cmd_stdout).to include("expect(1).to eq(2)")
end

it "finds the direct source of failure in any lib, app or spec file, and allows the user to configure what is considered a project source dir" do
it "finds the direct source of failure in any lib, app or spec file, and allows the user to configure what is considered a project source dir", :pending => RSpec::Support::Ruby.jruby_9000? do
write_file "lib/lib_mod.rb", "
module LibMod
def self.trigger_failure
Expand Down Expand Up @@ -101,7 +101,7 @@ def self.trigger_failure
and exclude("raise 'AppMod failure'")
end

it "finds the callsite of a method provided by a gem that fails (rather than the line in the gem)" do
it "finds the callsite of a method provided by a gem that fails (rather than the line in the gem)", :pending => RSpec::Support::Ruby.jruby_9000? do
write_file "vendor/gems/assertions/lib/assertions.rb", "
module Assertions
AssertionFailed = Class.new(StandardError)
Expand Down Expand Up @@ -135,7 +135,7 @@ def assert(value, msg)
and exclude("raise(AssertionFailed, msg)")
end

it "falls back to finding a line in a gem when there are no backtrace lines in the app, lib or spec directories" do
it "falls back to finding a line in a gem when there are no backtrace lines in the app, lib or spec directories", :pending => RSpec::Support::Ruby.jruby_9000? do
write_file "vendor/gems/before_failure/lib/before_failure.rb", "
RSpec.configure do |c|
c.before { raise 'before failure!' }
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/core/example_group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ def define_and_run_group(define_outer_example = false)
expect(self.group.examples.first.execution_result.pending_message).to eq(RSpec::Core::Pending::NO_REASON_GIVEN)
end

it 'sets the backtrace to the example definition so it can be located by the user' do
it 'sets the backtrace to the example definition so it can be located by the user', :pending => RSpec::Support::Ruby.jruby_9000? do
file = RSpec::Core::Metadata.relative_path(__FILE__)
expected = [file, __LINE__ + 2].map(&:to_s)
group = RSpec.describe do
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/core/example_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ def expect_pending_result(example)
expect(blah).to be(:success)
end

it 'sets the backtrace to the example definition so it can be located by the user' do
it 'sets the backtrace to the example definition so it can be located by the user', :pending => RSpec::Support::Ruby.jruby_9000? do
file = RSpec::Core::Metadata.relative_path(__FILE__)
expected = [file, __LINE__ + 2].map(&:to_s)
group = RSpec.describe do
Expand Down