spec/lib/builder/script/ruby_spec.rb in vx-builder-0.0.12 vs spec/lib/builder/script/ruby_spec.rb in vx-builder-0.0.13

- old
+ new

@@ -1,25 +1,28 @@ require 'spec_helper' describe Vx::Builder::Script::Ruby do - let(:app) { ->(_) { 0 } } + let(:app) { ->(env) { env } } let(:script) { described_class.new app } let(:env) { create :env } let(:run) { script.call env } subject { run } - it { should eq 0 } + it { should eq env } context "run it" do let(:command) { create :command_from_env, env: env } + subject { env } + before { run } - it "should be success" do - puts env - puts command - - system( command ) - expect($?.to_i).to eq 0 + context "should be success" do + its(:before_install) { should_not be_empty } + its(:announce) { should_not be_empty } + its(:install) { should_not be_empty } + its(:cached_directories) { should eq %w{ ~/.rubygems } } end + + end end