File: email_viewer_spec.rb

package info (click to toggle)
ruby-email-spec 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 980 kB
  • sloc: ruby: 2,420; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 639 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'spec_helper'
require 'launchy'

describe EmailSpec::EmailViewer do
  describe ".open_in_browser" do
    it "should open with launchy" do
      expected_uri = URI("file://#{File.expand_path("a_file")}")
      expect(Launchy).to receive(:open).with(expected_uri)
      EmailSpec::EmailViewer.open_in_browser("a_file")
    end
  end

  describe ".open_in_text_editor" do
    it "should open with launchy" do
      expected_uri = URI("file://#{File.expand_path("a_file")}")
      expect(Launchy).to receive(:open).with(expected_uri, {application: :editor})
      EmailSpec::EmailViewer.open_in_text_editor("a_file")
    end
  end
end