Skip to content

Commit

Permalink
fixing integration tests for the new docker driver test, fixing inclu…
Browse files Browse the repository at this point in the history
…de folders for intellij
  • Loading branch information
EugenMayer committed Oct 31, 2017
1 parent 02d1424 commit 03cfce5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
1 change: 1 addition & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 7 additions & 9 deletions docker_sync.iml
Original file line number Diff line number Diff line change
Expand Up @@ -45,35 +45,33 @@
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="rbenv: 2.2.4" jdkType="RUBY_SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.1.2, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="backticks (v1.0.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.14.6, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.1, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.5, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="daemons (v1.2.4, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="docker-compose (v1.1.5, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="docker-compose (v1.1.6, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="dotenv (v2.2.1, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="gem_update_checker (v0.2.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.8.4, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.2, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.2, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="os (v1.0.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="pry (v0.10.4, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.5.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.6.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-bash (v0.1.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.5.4, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.5.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.5.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.5.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.6.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.6.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.6.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.6.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="slop (v3.6.0, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="terminal-notifier (v1.6.3, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.4, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, rbenv: 2.2.4) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.3, rbenv: 2.2.4) [gem]" level="application" />
</component>
<component name="RModuleSettingsStorage">
<LOAD_PATH number="1" string0="$MODULE_DIR$/lib" />
<LOAD_PATH number="2" string0="$MODULE_DIR$/lib" string1="$MODULE_DIR$/spec" />
<I18N_FOLDERS number="0" />
</component>
</module>
9 changes: 2 additions & 7 deletions spec/lib/docker-sync/dependencies/docker_driver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@
expect(described_class).to have_received(:system).with('ps x | grep MacOS | grep -q com.docker.osx.hyperkit.linux')
end

it 'checks if Docker is running from /var/lib/docker' do
subject
expect(described_class).to have_received(:system).with('docker info | grep -q "Docker Root Dir: /var/lib/docker"')
end

it 'is memoized' do
expect { 2.times { described_class.docker_for_mac? } }.to change { described_class.instance_variable_defined?(:@docker_for_mac) }
expect(described_class).to have_received(:system).exactly(:twice)
expect { 1.times { described_class.docker_for_mac? } }.to change { described_class.instance_variable_defined?(:@docker_for_mac) }
expect(described_class).to have_received(:system).exactly(:once)
end
end

Expand Down
8 changes: 4 additions & 4 deletions spec/lib/docker-sync/project_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,13 @@
it do
use_fixture 'simplest' do
if OS.linux?
is_expected.not_to be_unison_required
is_expected.not_to unison_required?
else
is_expected.to be_unison_required
is_expected.to unison_required?
end
end
end
it do use_fixture 'rsync' do is_expected.not_to be_unison_required end end
it do use_fixture 'unison' do is_expected.to be_unison_required end end
it do use_fixture 'rsync' do is_expected.not_to unison_required? end end
it do use_fixture 'unison' do is_expected.to unison_required? end end
end
end

0 comments on commit 03cfce5

Please sign in to comment.