Sha256: 4c42da3a6bf2cbf341924a870e7ec5bd0121e7e70c304bf9bab51a222b4b2f72
Contents?: true
Size: 1.35 KB
Versions: 1
Compression:
Stored size: 1.35 KB
Contents
require "spec_helper" describe "initializing a presentation" do let(:presentation_dir){GitHelper.presentation_dir} before do @helper = GitHelper.new(presentation_dir) end context ".presentation file" do it "should be written to root directory" do @helper.initialise_presentation do expect(File.exists?(".presentation")).to be_truthy end end it "should have a slides node" do @helper.initialise_presentation do |commits, yaml| expect(yaml["slides"]).not_to be_nil end end it 'should have a branch note' do @helper.initialise_presentation do |commits, yaml| expect(yaml["branch"]).not_to be_nil end end it "should contain a line for each commit to the repository" do @helper.initialise_presentation do |commits, yaml| expect(yaml["slides"].length).not_to eql commits.length end end it "first line should contain the first commit number" do @helper.initialise_presentation({:delay => true}) do |commits, yaml| expect(yaml["slides"][0]["slide"]["commit"]).to eql commits.first.sha end end it "second line should contain the second commit number" do @helper.initialise_presentation({:delay => true}) do |commits, yaml| expect(yaml["slides"][1]["slide"]["commit"]).to eql commits[1].sha end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
git_presenter-1.4.0 | spec/integration/initialize_presentation_spec.rb |