-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ryan Brewster
committed
Feb 3, 2015
1 parent
0ec18a1
commit 7531818
Showing
3 changed files
with
13 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
describe New::Task do | ||
describe.skip New::Task do | ||
before do | ||
allow(New::Task).to receive(:require) | ||
allow(New::Task).to receive(:system) | ||
@task = New::Task.load root('spec', 'fixtures', 'task', 'task_task.rb') | ||
end | ||
|
||
after do | ||
allow(New::Task).to receive(:require).and_call_original | ||
allow(New::Task).to receive(:system).and_call_original | ||
end | ||
|
||
describe.skip '.load' do | ||
it 'should require the task' do | ||
expect(New::Task).to receive(:require).with root('spec', 'fixtures', 'task', 'task_task') | ||
end | ||
it 'should require the task' do | ||
expect(New::Task).to have_received(:require).with root('spec', 'fixtures', 'task', 'task_task') | ||
end | ||
|
||
it 'should install gems' do | ||
expect(New::Task).to receive(:system).with "bundle install --gemfile=#{root('spec', 'fixtures', 'task', 'Gemfile')}" | ||
end | ||
it 'should install gems' do | ||
expect(New::Task).to have_received(:system).with "bundle install --gemfile=#{root('spec', 'fixtures', 'task', 'Gemfile')}" | ||
end | ||
|
||
context '.inherited' do | ||
it 'should add task to global array' do | ||
puts New::Task.class_var(:tasks).inspect | ||
expect(New::Task.class_var(:tasks)[:task]).to eq New::TaskTask | ||
end | ||
it 'should add task to global array' do | ||
expect(New::Task.class_var(:tasks)[:task]).to eq New::TaskTask | ||
end | ||
end |