Sha256: 9cd0bcd507a677c3feaa75723590aa157c402bdef4e3581d34022296f89567a4
Contents?: true
Size: 1.02 KB
Versions: 23
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' require 'codeclimate-test-reporter' require 'coveralls' CodeClimate::TestReporter.start Coveralls.wear! describe MyDashboard do it { expect(MyDashboard).to respond_to :configuration } describe '.config' do it { expect(MyDashboard.config).to be_a(MyDashboard::Configuration) } end describe '.configure' do let(:configuration) { MyDashboard::Configuration.new } before do allow(MyDashboard).to receive(:config).and_return(:configuration) end context 'when block given' do it 'yields configuration' do expect(MyDashboard).to receive(:configure).and_yield(configuration) MyDashboard.configure {|config|} end end context 'when no block given' do it { expect(MyDashboard.configure).to be_nil } end end describe '.first_dashboard' do let(:dir) { 'foo' } let(:dirs) { [dir] } before do allow(Dir).to receive(:[]).and_return(dirs) end it { expect(MyDashboard.first_dashboard).to eq(dir) } end end
Version data entries
23 entries across 23 versions & 1 rubygems