Skip to content

Commit

Permalink
Get build passing under rubinius. Add to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
searls committed Jan 14, 2016
1 parent 0aacc2f commit e1d7c6c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ env:
- RSPEC_VERSION=">=3.1.0"
rvm:
- jruby
- rbx-2
- 1.9.3
- 2.0.0
1 change: 1 addition & 0 deletions examples/integration/failing_messages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
require 'open3'

describe "Failing Messages" do
skip_natural_assertions_if_not_supported

IOS = Struct.new(:out, :err)

Expand Down
1 change: 1 addition & 0 deletions examples/integration/then_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def to_bool

describe "Then" do
context "empty thens with natural assertions" do
skip_natural_assertions_if_not_supported #<--we can't detect void statements
Then { }
end
context "thens to_bool/true will pass" do
Expand Down
10 changes: 9 additions & 1 deletion examples/minitest_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

module GivenAssertions
def given_assert(cond)
assert cond
Expand All @@ -22,5 +21,14 @@ def given_assert_raises(error, pattern=//, &block)
end
end

module NaturalAssertionControl
def skip_natural_assertions_if_not_supported
if !Given::NATURAL_ASSERTIONS_SUPPORTED
Given { skip "This test requires a Ruby runtime with full natural assertions support." }
end
end
end

Minitest::Spec.send(:include, GivenAssertions)
Minitest::Test.send(:include, GivenAssertions)
include NaturalAssertionControl

0 comments on commit e1d7c6c

Please sign in to comment.