2011-08-02 09:38:59 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Guard::RailsAssets::CliRunner do
|
|
|
|
|
|
|
|
it 'should run the command' do
|
|
|
|
subject.stub(:system)
|
2011-11-18 15:22:17 +00:00
|
|
|
subject.should_receive(:system).with("bundle exec rake assets:clean assets:precompile RAILS_ENV=test")
|
2011-08-02 09:38:59 +00:00
|
|
|
subject.compile_assets
|
|
|
|
end
|
2011-09-04 08:09:45 +00:00
|
|
|
|
|
|
|
context 'with production environment' do
|
|
|
|
subject { Guard::RailsAssets::CliRunner.new(:rails_env => :production) }
|
|
|
|
it 'should run the command' do
|
|
|
|
subject.stub(:system)
|
2011-11-18 15:22:17 +00:00
|
|
|
subject.should_receive(:system).with("bundle exec rake assets:clean assets:precompile RAILS_ENV=production")
|
2011-09-04 08:09:45 +00:00
|
|
|
subject.compile_assets
|
|
|
|
end
|
|
|
|
end
|
2011-08-02 09:38:59 +00:00
|
|
|
end
|