RSpec::Matchers.define :show_the_flash do |expected|
  match do |actual|
    expect(actual).to have_selector("#flash #flash_#{expected}")
  end

  failure_message_for_should do |actual|
    %[Expected this content:\n#{actual.body}\n to have an element matching "#flash #flash_#{expected}"]
  end
end

RSpec::Matchers.define :show_the_flash do |expected|
  match do |actual|
    expect(actual).to have_selector("#flash #flash_#{expected}")
  end

  failure_message do |actual|
    %[Expected this content:\n#{actual.body}\n to have an element matching "#flash #flash_#{expected}"]
  end
end

Convert specs to RSpec 3.6.0 syntax with Transpec
Convert specs to RSpec 3.6.0 syntax with Transpec

This conversion is done by Transpec 3.3.0 with the following command:
    transpec

* 1 conversion
    from: failure_message_for_should { }
      to: failure_message { }

For more details: https://github.com/yujinakayama/transpec#supported-conversions
