Sha256: 3474b4d18ba0bc16ee6e9b7cc42b6fdd3946f2f795b342d7cca9e1b2f73c2191
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
require "spec_helper" describe "starting a presentation" do let(:presentation_dir){File.dirname(__FILE__) + "/../../presentation"} before do @helper = GitHelper.new(presentation_dir) end it "should contian the commits for presentations" do @helper.initialise_presentation @helper.add_command("echo hello world") Dir.chdir(presentation_dir) do presenter = GitPresenter.new(".", false) presentation = presenter.execute('start') presentation.slides.length.should eql 4 end end it "first commit should be first commit in file" do @helper.start_presentation do |commits, presenter| presenter.slides[0].commit.should eql commits[0].id end end it "second commit should be second commit in file" do @helper.start_presentation do |commits, presenter| presenter.slides[1].commit.should eql commits[1].id end end it "the last commit should be a command" do command = "echo hello world" @helper.start_presentation(command) do |commits, presenter| presenter.slides[3].run.should eql command end end it "should have the presentation at first commit" do @helper.start_presentation do |commits, presenter| @helper.head_position.should eql commits.first.id end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
git_presenter-0.3.0 | spec/integration/start_presentation_spec.rb |