Sha256: a7441e9765bdf801cafc2cbe066155102e0a02549c6fb181522eb5d26a45589b
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
require 'nc' RSpec.configure do |config| config.color_enabled = true config.formatter = 'doc' config.formatter = 'Nc' end describe Nc do let(:formatter) { Nc.new(StringIO.new) } let(:current_dir) { File.basename(File.expand_path '.') } # emoji let(:success) { "\u2705" } let(:failure) { "\u26D4" } it 'returns the summary' do TerminalNotifier.should_receive(:notify).with( "Finished in 0.0001 seconds\n3 examples, 1 failure, 1 pending", :title => "#{failure} #{current_dir}: 1 failed example" ) formatter.dump_summary(0.0001, 3, 1, 1) end it 'returns a failing notification' do TerminalNotifier.should_receive(:notify).with( "Finished in 0.0001 seconds\n1 example, 1 failure", :title => "#{failure} #{current_dir}: 1 failed example" ) formatter.dump_summary(0.0001, 1, 1, 0) end it 'returns a success notification' do TerminalNotifier.should_receive(:notify).with( "Finished in 0.0001 seconds\n1 example, 0 failures", :title => "#{success} #{current_dir}: Success" ) formatter.dump_summary(0.0001, 1, 0, 0) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rspec-nc-0.0.4 | spec/nc_spec.rb |
rspec-nc-0.0.3 | spec/nc_spec.rb |
rspec-nc-0.0.2 | spec/nc_spec.rb |