Sha256: 436526217d09f46e1b3fbaa8124ccf1d18c78c7ad6653685e4c9e785afe0bf0f

Contents?: true

Size: 625 Bytes

Versions: 3

Compression:

Stored size: 625 Bytes

Contents

require 'spec_helper'
require 'guard'

module RevealCK
  module Commands
    describe ListenToReloadBrowser do
      describe '#run' do
        it 'works with Guard to setup livereload' do

          serve_ui = double

          expect(serve_ui)
            .to(receive(:prefix_for))
            .and_return('[prefix]')

          expect(::Guard)
            .to(receive(:start))
            .once

          listen_to_reload_browser = ListenToReloadBrowser.new(serve_ui)
          listen_to_reload_browser.run

          expect(Guard::UI.options[:template]).to eq '[prefix] :message'
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reveal-ck-0.6.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-0.5.1 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-0.5.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb