Sha256: 3dfd5832e70584a24a7b404cb02e99bea1fcdfea2755ffbc614f8d88b6c0755f

Contents?: true

Size: 451 Bytes

Versions: 8

Compression:

Stored size: 451 Bytes

Contents

require 'nc_fail'

describe NcFail do
  let(:formatter) { NcFail.new(StringIO.new) }

  it 'returns a failing notification' do
    expect(TerminalNotifier).to receive(:notify)

    formatter.instance_variable_set('@failed_examples', [1])
    formatter.say('title', 'body')
  end

  it 'does not return a success notification when tests are passing' do
    expect(TerminalNotifier).to_not receive(:notify)

    formatter.say('title', 'body')
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
rspec-nc-0.2.1 spec/nc_fail_spec.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/rspec-nc-0.2.0/spec/nc_fail_spec.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/rspec-nc-0.2.0/spec/nc_fail_spec.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/rspec-nc-0.2.0/spec/nc_fail_spec.rb
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/rspec-nc-0.2.0/spec/nc_fail_spec.rb
rspec-nc-0.2.0 spec/nc_fail_spec.rb
rspec-nc-0.1.1 spec/nc_fail_spec.rb
rspec-nc-0.1.0 spec/nc_fail_spec.rb