spec/lib/build_matrix_spec.rb in evrone-ci-router-0.2.0.pre0 vs spec/lib/build_matrix_spec.rb in evrone-ci-router-0.2.0.pre1
- old
+ new
@@ -3,11 +3,13 @@
describe Evrone::CI::Router::BuildMatrix do
let(:attributes) { {
env: %w{ FOO=1 BAR=2 },
rvm: %w{ 1.8.7 1.9.3 2.0.0 },
- scala: %w{ 2.9.2 2.10.1 }
+ scala: %w{ 2.9.2 2.10.1 },
+ before_script: "echo before_script",
+ script: "echo script"
} }
let(:travis) { create :travis, attributes: attributes }
let(:matrix) { described_class.new travis }
subject { matrix }
@@ -25,11 +27,20 @@
it { should eq [] }
end
end
context 'travises' do
+ subject { matrix.travises }
+
+ it "should copy script from source" do
+ expect(subject.map(&:script).uniq).to eq [["echo script"]]
+ end
+
+ it "should copy before_script from source" do
+ expect(subject.map(&:before_script).uniq).to eq [["echo before_script"]]
+ end
+
context "values" do
- subject { matrix.travises }
it { should have(12).items }
context "attributes" do
subject { matrix.travises.map(&:to_matrix_s) }