Sha256: f1dd082ff061942525218cd3b9e3b644d44cf8d9d45f191602acb3a79e1897e5
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
require 'spec_helper' require 'script/classes/deployable_class' describe Script::Deployable do subject do obj = DeployableClass.new obj.instance_eval do test do unless @var > 0 raise "script failed verification" end end end obj end it "should include Testable" do expect(subject.class.included_modules).to include(Script::Testable) end it "should not be deployed by default" do expect(subject).not_to be_deployed end describe "#deploy!" do it "should test! the script before deploying it" do subject.var = -1 expect { subject.deploy! }.to raise_error(RuntimeError) end it "should mark the script deployed" do subject.deploy! expect(subject).to be_deployed end it "should not mark the script as evacuated" do subject.deploy! expect(subject).not_to be_evacuated end end describe "#evacuate!" do it "should mark the script as evacuated" do subject.evacuate! expect(subject).to be_evacuated end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ronin-1.5.1 | spec/script/deployable_spec.rb |