Sha256: 6e2b9fd6e3fa1341629f26d426eaef34006b293e2aa93e4c4507d261839cb6ea

Contents?: true

Size: 656 Bytes

Versions: 2

Compression:

Stored size: 656 Bytes

Contents

require 'spec_helper'

describe PerfectSched::Model do
  let (:config){ double('config') }
  let (:client){ double('client', config: config) }
  let (:klass){ Class.new{include PerfectSched::Model} }
  let (:model){ klass.new(client) }
  describe '.new' do
    it 'creates an instance' do
      expect(model).to be_a(PerfectSched::Model)
      expect(model.instance_variable_get(:@client)).to eq(client)
    end
  end
  describe '#client' do
    it 'returns its client' do
      expect(model.client).to eq(client)
    end
  end
  describe '#config' do
    it 'returns its client.config' do
      expect(model.config).to eq(client.config)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
perfectsched-0.8.12 spec/model_spec.rb
perfectsched-0.8.11 spec/model_spec.rb