diff --git a/examples/integration/failing_messages_spec.rb b/examples/integration/failing_messages_spec.rb index 5fa19cf..4c8f84d 100644 --- a/examples/integration/failing_messages_spec.rb +++ b/examples/integration/failing_messages_spec.rb @@ -2,8 +2,6 @@ require 'open3' describe "Failing Messages" do - skip_natural_assertions_if_not_supported - IOS = Struct.new(:out, :err) def run_spec(filename) @@ -18,12 +16,14 @@ def run_spec(filename) When(:ios) { run_spec(failing_test) } context "when referencing constants from nested modules" do + skip_natural_assertions_if_not_supported Given(:failing_test) { "module_nesting_spec.rb" } Then { ios.err == "" } And { ios.out !~ /uninitialized constant RSpec::Given::InstanceExtensions::X/ } end context "when referencing undefined methods" do + skip_natural_assertions_if_not_supported Given(:failing_test) { "undefined_method_spec.rb" } Then { ios.err == "" } And { complains_xyz_is_not_in_scope?(ios.out) } @@ -39,6 +39,7 @@ def complains_xyz_is_not_in_scope?(out) end context "when breaking down expressions" do + skip_natural_assertions_if_not_supported Given(:failing_test) { "eval_subexpression_spec.rb" } Then { ios.err == "" } And { ios.out =~ /false *<- array\[index\]\.upcase == value$/ } @@ -55,6 +56,7 @@ def complains_xyz_is_not_in_scope?(out) end context "with an oddly formatted then" do + skip_natural_assertions_if_not_supported Given(:failing_test) { "oddly_formatted_then.rb" } Then { ios.out =~ /Failure\/Error:\s*Then \{ result == \['a',$/ } And { ios.out =~ /expected: "anything"/ } diff --git a/spec/lib/given/natural_assertion_spec.rb b/spec/lib/given/natural_assertion_spec.rb index 45d30ea..2d1c761 100644 --- a/spec/lib/given/natural_assertion_spec.rb +++ b/spec/lib/given/natural_assertion_spec.rb @@ -12,8 +12,8 @@ describe Given::NaturalAssertion do describe "#content?" do - skip_natural_assertions_if_not_supported context "with empty block" do + skip_natural_assertions_if_not_supported FauxThen { } Then { expect(na).to_not have_content } end