spec/lib/mshard/mshard_spec.rb in mshard-0.5.1 vs spec/lib/mshard/mshard_spec.rb in mshard-0.6.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'mshard'
describe MShard::MShard do
it '#try works' do
expect(subject.try { :result }).to be(:result)
@@ -32,24 +34,7 @@
end
it '#set_safe works' do
expect(subject.set_safe(:params)).to eq(:id)
end
- end
-
- it '#set_error works' do
- expect(described_class).to receive(:post).and_return('id' => :id)
- e = double(inspect: :inspect, backtrace: [:a, :b])
- expect(subject.set_error(e)).to eq(:id)
- end
-
- it '#error_to_html works' do
- e = begin
- raise
- rescue => e
- e
- end
- html = subject.error_to_html(e)
- expect(html).to include('<title>Error</title>')
- expect(html).to include('<pre>RuntimeError</pre>')
end
end