Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Commit

Permalink
Get to green
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe Berke-Williams committed Sep 13, 2011
1 parent 56b11b3 commit 15a65df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 37 deletions.
31 changes: 0 additions & 31 deletions spec/kumade/deployer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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' }

Expand Down
15 changes: 9 additions & 6 deletions spec/kumade/packager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 15a65df

Please sign in to comment.