Sha256: 010e8f195b395b086d1a6b855f44f56f1067a6e5ae58a2a8e13ffeef125c51f1
Contents?: true
Size: 1.38 KB
Versions: 7
Compression:
Stored size: 1.38 KB
Contents
require 'spec_helper' describe Ridley::BootstrapContext::Base do let(:host) { "reset.riotgames.com" } let(:options) do { server_url: "https://api.opscode.com/organizations/vialstudios", validator_client: "chef-validator", validator_path: fixtures_path.join("my-fake.pem").to_s, encrypted_data_bag_secret: File.read(fixtures_path.join("my-fake.pem")), chef_version: "11.4.0" } end describe "ClassMethods" do subject { described_class } describe ":included" do context "when a class includes Ridley::BootstrapBinding" do it "should have a validate_options class method`" do subject.methods.should include(:validate_options) end end end describe ":validate_options" do context "when server_url is not specified" do let(:options) { Hash.new } it "raises an ArgumentError" do expect { subject.validate_options(options) }.to raise_error(Ridley::Errors::ArgumentError) end end end context "when validator_path is not specified" do let(:options) do { server_url: "https://api.opscode.com/organizations/vialstudios" } end it "raises an ArgumentError" do expect { subject.validate_options(options) }.to raise_error(Ridley::Errors::ArgumentError) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems