Sha256: 4a12f204c18b83e940ae1a2fefc67ced9ad8d943d0d3140641d96d1f3642085f

Contents?: true

Size: 639 Bytes

Versions: 8

Compression:

Stored size: 639 Bytes

Contents

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
email_spec-2.3.0 spec/email_spec/email_viewer_spec.rb
email_spec-2.2.2 spec/email_spec/email_viewer_spec.rb
email_spec-2.2.1 spec/email_spec/email_viewer_spec.rb
email_spec-2.2.0 spec/email_spec/email_viewer_spec.rb
email_spec-2.1.2 spec/email_spec/email_viewer_spec.rb
email_spec-2.1.1 spec/email_spec/email_viewer_spec.rb
email_spec-2.1.0 spec/email_spec/email_viewer_spec.rb
email_spec-2.0.0 spec/email_spec/email_viewer_spec.rb