Browse files

Get to green

  • Loading branch information...
1 parent 56b11b3 commit 15a65df2ee12e42d389562f973a241992827e9d2 @gabebw gabebw committed Sep 12, 2011
Showing with 9 additions and 37 deletions.
  1. +0 −31 spec/kumade/deployer_spec.rb
  2. +9 −6 spec/kumade/packager_spec.rb
View
31 spec/kumade/deployer_spec.rb
@@ -54,44 +54,13 @@
end
end
-describe Kumade::Deployer, "#sync_heroku" do
- let(:environment) { 'my-env' }
- subject { Kumade::Deployer.new(environment) }
- let(:git_mock) { mock() }
- before { subject.stub(:git => git_mock) }
- it "should call git.create and git.push" do
- git_mock.should_receive(:create).with("deploy")
- git_mock.should_receive(:push).with("deploy:master", environment, true)
- subject.sync_heroku
- end
-end
-
-
describe Kumade::Deployer, "#ensure_clean_git" do
it "calls git.ensure_clean_git" do
subject.git.should_receive(:ensure_clean_git)
subject.ensure_clean_git
end
end
-describe Kumade::Deployer, "#heroku_migrate" do
- let(:environment){ 'staging' }
-
- before do
- subject.stub(:say)
- force_add_heroku_remote(environment)
- end
-
- it "runs db:migrate with the correct app" do
- subject.stub(:run => true)
- subject.should_receive(:heroku).
- with("rake db:migrate")
- subject.should_receive(:success).with("Migrated staging")
-
- subject.post_deploy
- end
-end
-
describe Kumade::Deployer, "#ensure_heroku_remote_exists" do
let(:environment) { 'staging' }
View
15 spec/kumade/packager_spec.rb
@@ -232,13 +232,16 @@
end
describe Kumade::Packager, "#jammit_assets_path" do
- let(:git_mock) { mock() }
- subject { Kumade::Packager.new(git_mock) }
- it "returns the correct asset path" do
- Jammit.stub(:package_path => 'blerg')
- current_dir = File.expand_path(Dir.pwd)
- subject.jammit_assets_path.should == File.join(current_dir, 'public', 'blerg')
+ let(:git) { mock() }
+ let(:packager) { Kumade::Packager.new(git) }
+
+ before do
+ Jammit.stub(:package_path).and_return('blerg')
end
+
+ subject { packager.jammit_assets_path }
+
+ it { should == File.join(Jammit::PUBLIC_ROOT, 'blerg') }
end
describe Kumade::Packager, "#more_assets_path" do

0 comments on commit 15a65df

Please sign in to comment.