Re-implemented all development Rake tasks in Thor. Now actually tested.
Fixes: * https://www.pivotaltracker.com/story/show/25484287 & https://github.com/pivotal/jasmine/issues/183 * https://www.pivotaltracker.com/story/show/25485401 & https://github.com/pivotal/jasmine/issues/189 * https://www.pivotaltracker.com/story/show/25485953 & https://github.com/pivotal/jasmine/issues/159
This commit is contained in:
39
spec/tasks/release_spec.rb
Normal file
39
spec/tasks/release_spec.rb
Normal file
@@ -0,0 +1,39 @@
|
||||
require 'spec_helper.rb'
|
||||
|
||||
describe "Release task" do
|
||||
|
||||
let(:jasmine_dev) { JasmineDev.new }
|
||||
|
||||
describe "when the pages submodule is not present" do
|
||||
before do
|
||||
jasmine_dev.should_receive(:has_pages_submodule?).and_return(false)
|
||||
|
||||
@output = capture_output { jasmine_dev.release_prep }
|
||||
end
|
||||
|
||||
it "should tell the user the task is running" do
|
||||
@output.should match(/Building Release/)
|
||||
end
|
||||
|
||||
it "should prompt the user to install the submodule" do
|
||||
@output.should match(/Submodule for Github Pages isn't present/)
|
||||
end
|
||||
end
|
||||
|
||||
describe "when the pages submodule is present" do
|
||||
before do
|
||||
JasmineDev.any_instance.should_receive(:write_version_files)
|
||||
JasmineDev.any_instance.should_receive(:build_distribution)
|
||||
JasmineDev.any_instance.should_receive(:build_standalone_distribution)
|
||||
JasmineDev.any_instance.should_receive(:build_github_pages)
|
||||
|
||||
jasmine_dev.should_receive(:has_pages_submodule?).and_return(true)
|
||||
|
||||
@output = capture_output { jasmine_dev.release_prep }
|
||||
end
|
||||
|
||||
it "should tell the user the task is running" do
|
||||
@output.should match(/Building Release/)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user