spec/lib/mshard/mshard_spec.rb in mshard-0.5.0 vs spec/lib/mshard/mshard_spec.rb in mshard-0.5.1

- old
+ new

@@ -1,11 +1,11 @@ require 'mshard' describe MShard::MShard do it '#try works' do expect(subject.try { :result }).to be(:result) - expect(subject.try(delay: 0.01) { fail }).to be(nil) + expect(subject.try(delay: 0.01) { raise }).to be(nil) end describe '#get' do before do expect(described_class).to receive(:get) @@ -42,14 +42,14 @@ expect(subject.set_error(e)).to eq(:id) end it '#error_to_html works' do e = begin - fail + raise rescue => e e end - html = (subject.error_to_html(e)) + html = subject.error_to_html(e) expect(html).to include('<title>Error</title>') expect(html).to include('<pre>RuntimeError</pre>') end end