Sha256: 8381a57b56dd1c067523933e9bebd3b92a62fb7fa560e26729625aa5aa59155d

Contents?: true

Size: 655 Bytes

Versions: 13

Compression:

Stored size: 655 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)
          thread = listen_to_reload_browser.run
          thread.join

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
reveal-ck-3.9.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.8.1 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.8.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.7.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.6.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.5.1 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.5.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.4.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.3.1 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.3.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.2.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.1.0 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb
reveal-ck-3.0.1 spec/lib/reveal-ck/commands/listen_to_reload_browser_spec.rb