Sha256: 09ba87949c17f1394a66c95994892b81ac1f67e58f23722c08c059e756cdb747

Contents?: true

Size: 999 Bytes

Versions: 15

Compression:

Stored size: 999 Bytes

Contents

module ::RSpec::Core::Notifications
  class ExamplesNotification
    def fully_formatted_failed_examples(colorizer=::RSpec::Core::Formatters::ConsoleCodes)
      formatted = "\nFailures:\n"

      failure_notifications.each_with_index do |failure, index|
        # string mutation
        formatted = formatted + failure.fully_formatted(index.next, colorizer)
      end

      formatted
    end
    
    def fully_formatted_pending_examples(colorizer=::RSpec::Core::Formatters::ConsoleCodes)
      formatted = "\nPending:\n"

      pending_examples.each do |example|
        formatted_caller = RSpec.configuration.backtrace_formatter.backtrace_line(example.location)

        # string mutation
        formatted = formatted +
          "  #{colorizer.wrap(example.full_description, :pending)}\n" \
          "    # #{colorizer.wrap(example.execution_result.pending_message, :detail)}\n" \
          "    # #{colorizer.wrap(formatted_caller, :detail)}\n"
      end

      formatted
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
opal-rspec-0.8.0 lib-opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.8.0.alpha3 lib-opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.8.0.alpha2 lib-opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.8.0.alpha1 lib-opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.7.1 lib-opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.7.0 lib-opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.6.2 opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.7.0.rc.2 lib-opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.7.0.rc.1 lib-opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.6.1 opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.6.0 opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.6.0.beta1 opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-connect-rspec-0.5.0 opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.5.0 opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb
opal-rspec-0.5.0.beta3 opal/opal/rspec/fixes/rspec/core/notifications/examples_notification.rb