Skip to content

Commit

Permalink
Change to 3.0 compatible syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj committed Oct 18, 2020
1 parent 9e5068e commit e04dd00
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Supported indicates if a specific Ruby version / Implementation is actively supp
| cRUBY/MRI | 2.5 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| cRUBY/MRI | 2.6 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| cRUBY/MRI | 2.7 | :heavy_check_mark: | :heavy_check_mark: | :soon: | :heavy_check_mark: |
| cRUBY/MRI | 3.0 | :soon: | :soon: | :soon: | :soon: |
| cRUBY/MRI | 3.0 | :warning: | :soon: | :soon: | :soon: |
| jruby | TBD | :email: | :email: | :email: | :email: |
| mruby | TBD | :email: | :email: | :email: | :email: |
| cRUBY/MRI | < 2.5 | :no_entry: | :no_entry: | :no_entry: | :no_entry: |
Expand All @@ -66,6 +66,7 @@ Supported indicates if a specific Ruby version / Implementation is actively supp
Labels:

* :heavy_check_mark: Supported.
* :warning: Experimental Support.
* :soon: Active work in progress.
* :email: Planned, please contact me on interest.
* :no_entry: Not being planned, or considered, still contact me on interest.
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def parse_expression(string)
module XSpecHelper
def verify_events(&block)
expectations = raw_expectations
.map(&XSpec::MessageExpectation.method(:parse))
.map { |attributes| XSpec::MessageExpectation.parse(**attributes) }

XSpec::ExpectationVerifier.verify(self, expectations, &block)
end
Expand Down
6 changes: 5 additions & 1 deletion spec/support/xspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ def validate_block_arity(observation, yields)

# block allows anything we can skip the check
return if observed.equal?(-1)
fail 'Optargs currently not supported' if observed < -1

if observed.negative?
observed = observed.succ.abs
end

block_arity_mismatch(observation, expected, observed) unless expected.equal?(observed)
end

Expand Down
8 changes: 4 additions & 4 deletions spec/unit/mutant/isolation/fork_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def apply
*read_fragments,
load_success,
child_wait
].map(&XSpec::MessageExpectation.method(:parse))
].map { |attributes| XSpec::MessageExpectation.parse(**attributes) }
end

specify do
Expand Down Expand Up @@ -235,7 +235,7 @@ def apply
}
},
child_wait
].map(&XSpec::MessageExpectation.method(:parse))
].map { |attributes| XSpec::MessageExpectation.parse(**attributes) }
end

specify do
Expand All @@ -258,7 +258,7 @@ def apply
return: nil
}
}
].map(&XSpec::MessageExpectation.method(:parse))
].map { |attributes| XSpec::MessageExpectation.parse(**attributes) }
end

specify do
Expand Down Expand Up @@ -296,7 +296,7 @@ def apply
return: [pid, status_error]
}
}
].map(&XSpec::MessageExpectation.method(:parse))
].map { |attributes| XSpec::MessageExpectation.parse(**attributes) }
end

specify do
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/mutant/parallel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def ivar(value, **attributes)
}
end

def mvar(*arguments)
ivar(*arguments).merge(receiver: Variable::MVar)
def mvar(value, **arguments)
ivar(value, **arguments).merge(receiver: Variable::MVar)
end

let(:raw_expectations) do
Expand Down

0 comments on commit e04dd00

Please sign in to comment.