spec/synx/project_spec.rb in synx-0.0.52 vs spec/synx/project_spec.rb in synx-0.0.53

- old
+ new

@@ -1,7 +1,6 @@ -require File.join(File.dirname(__FILE__), '..', 'spec_helper') - +require 'spec_helper' require 'fileutils' require 'pathname' require 'yaml' class Hash @@ -84,21 +83,21 @@ end end end def expected_file_structure - YAML::load_file(File.join(File.dirname(__FILE__), "expected_file_structure.yml")) + YAML::load_file(File.expand_path("../expected_file_structure.yml", __FILE__)) end def expected_group_structure - YAML::load_file(File.join(File.dirname(__FILE__), "expected_group_structure.yml")) + YAML::load_file(File.expand_path("../expected_group_structure.yml", __FILE__)) end describe "with no additional options" do before(:all) do - DUMMY_SYNX_TEST_PROJECT.sync + DUMMY_SYNX_TEST_PROJECT.sync(:output => StringIO.new) end it "should have the correct physical file structure" do verify_file_structure(Pathname(DUMMY_SYNX_TEST_PROJECT_PATH).parent, expected_file_structure) end @@ -123,11 +122,11 @@ end describe "with the prune option toggled" do before(:all) do - DUMMY_SYNX_TEST_PROJECT.sync(:prune => true) + DUMMY_SYNX_TEST_PROJECT.sync(:prune => true, :output => StringIO.new) end it "should remove unreferenced images and source files if the prune option is toggled" do expected_file_structure_with_removals = expected_file_structure expected_file_structure_with_removals["dummy"].except!("image-not-in-xcodeproj.png") @@ -142,25 +141,25 @@ end describe "with the no_default_exclusions option toggled" do before(:all) do - DUMMY_SYNX_TEST_PROJECT.sync(:no_default_exclusions => true) + DUMMY_SYNX_TEST_PROJECT.sync(:no_default_exclusions => true, :output => StringIO.new) end it "should have an empty array for default exclusions" do expect(DUMMY_SYNX_TEST_PROJECT.group_exclusions.count).to eq(0) end end describe "with group_exclusions provided as options" do before(:all) do - DUMMY_SYNX_TEST_PROJECT.sync(:group_exclusions => %W(/dummy /dummy/SuchGroup/VeryChildGroup)) + DUMMY_SYNX_TEST_PROJECT.sync(:group_exclusions => %W(/dummy /dummy/SuchGroup/VeryChildGroup), :output => StringIO.new) end it "should add the group exclusions to the array" do - expect(DUMMY_SYNX_TEST_PROJECT.group_exclusions.sort).to eq(%W(/Libraries /Products /Frameworks /dummy /dummy/SuchGroup/VeryChildGroup).sort) + expect(DUMMY_SYNX_TEST_PROJECT.group_exclusions.sort).to eq(%W(/Libraries /Products /Frameworks /Pods /dummy /dummy/SuchGroup/VeryChildGroup).sort) end end end \ No newline at end of file