<commit_before>require 'spec_helper'
require 'heirloom/cli'

describe Heirloom do

  before do

    options = { :name          => 'archive_name',
                :id            => '1.0.0',
                :bucket_prefix => 'bp',
                :old_secret    => 'oldpassword',
                :new_secret    => 'newpassword' }
    Trollop.stub(:options).and_return options

    catalog_stub = stub :regions => ['us-east-1', 'us-west-1']
    Heirloom::Catalog.stub(:new).and_return(catalog_stub)

  end

  it "should delegate to archive object" do

    Heirloom::Archive.stub(:new).and_return(@archive_mock)

    @archive_mock.should_receive(:rotate)

    @cli_rotate = Heirloom::CLI::Rotate.new.rotate

  end
  
end<commit_msg>fixing specs - adding aws params to stubbed trollop options and creating archive_mock<commit_after>require 'spec_helper'
require 'heirloom/cli'

describe Heirloom do

  before do

    options = { :name           => 'archive_name',
                :id             => '1.0.0',
                :bucket_prefix  => 'bp',
                :old_secret     => 'oldpassword',
                :new_secret     => 'newpassword',
                :aws_access_key => 'key',
                :aws_secret_key => 'secret' }
    Trollop.stub(:options).and_return options

    catalog_stub = stub :regions => ['us-east-1', 'us-west-1']
    Heirloom::Catalog.stub(:new).and_return(catalog_stub)

  end

  it "should delegate to archive object" do

    archive_mock = mock 'archive'
    Heirloom::Archive.stub(:new).and_return(archive_mock)
    archive_mock.should_receive(:rotate)

    Heirloom::CLI::Rotate.new.rotate

  end
  
end
{'fraction_non_alphanumeric': 0.12461820403176542, 'fraction_numerical': 0.006108735491753207, 'mean_word_length': 2.4411764705882355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5413615', 'n_tokens_mistral': 550, 'n_tokens_neox': 515, 'n_words': 100}