Sha256: 692689e86cf72277718ca9ccea244269f1217ce2fa94a61d9bb97027ed404909

Contents?: true

Size: 1001 Bytes

Versions: 7

Compression:

Stored size: 1001 Bytes

Contents

require 'spec_helper'

describe Lionel::Export do
  describe "configuration" do
    before(:each) do
      subject.trello_board_id = "TRELLO_BOARD_ID"
      subject.google_doc_id = "GOOGLE_DOC_ID"
    end

    it {
      subject.data.should eq({
        trello_board_id: "TRELLO_BOARD_ID",
        google_doc_id: "GOOGLE_DOC_ID"
      })
    }

    it "can save the configuration data" do
      subject.configuration.should_receive(:save).with(subject.data)
      subject.save_configuration
    end

    it { subject.should be_configured }

    context "not configured" do
      before do
        subject.configuration.stub(trello_board_id: nil, google_doc_id: nil)
      end

      it { subject.trello_board_id = nil;
            subject.should_not be_configured }
      it { subject.google_doc_id = nil;
            subject.should_not be_configured }
      it { subject.trello_board_id = nil;
            subject.google_doc_id = nil;
            subject.should_not be_configured }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lionel_richie-0.3.1 spec/lib/lionel/export_spec.rb
lionel_richie-0.3.0 spec/lib/lionel/export_spec.rb
lionel_richie-0.2.4 spec/lib/lionel/export_spec.rb
lionel_richie-0.2.3.1 spec/lib/lionel/export_spec.rb
lionel_richie-0.2.3 spec/lib/lionel/export_spec.rb
lionel_richie-0.2.1 spec/lib/lionel/export_spec.rb
lionel_richie-0.2.0 spec/lib/lionel/export_spec.rb