Sha256: 4898903261a26e5aab96b6c1b4700ba5a289c8c6ee846576e31ad63cee54a4ab

Contents?: true

Size: 977 Bytes

Versions: 5

Compression:

Stored size: 977 Bytes

Contents

require 'spec_helper'

describe Cuesmash::JsonConf do
  describe 'when executed' do
    before(:each) do
      @json = Cuesmash::JsonConf.new(app_path: 'spec', file_name: 'test', port: '4567')
      @json.stub(:update)
      @json.stub(:clear)
      @json.stub(:completed)
      @json.stub(:started)
    end

    it 'should update' do
      @json.should_receive(:update)
      @json.execute
    end
  end

  describe 'when updating' do
    before(:each) do
      @file_write = double(File)
      @file_write.stub(:write)

      @json = Cuesmash::JsonConf.new(app_path: 'spec', file_name: 'test', port: '4567')
      @json.stub(:clear)
      @json.stub(:completed)
      @json.stub(:started)
      @json.stub(:app_path) { 'app_path' }
      @json.stub(:file_name)
    end

    it 'should set the server ip and port' do
      @json.stub(:server_ip) { 'server_ip' }

      @json.execute
    end

    it 'should write the app server plist' do
      @json.execute
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cuesmash-0.6.0 spec/jsonconf_spec.rb
cuesmash-0.5.0 spec/jsonconf_spec.rb
cuesmash-0.4.1 spec/jsonconf_spec.rb
cuesmash-0.4.0 spec/jsonconf_spec.rb
cuesmash-0.3.0 spec/jsonconf_spec.rb