diff options
| author | Samuel Giddins <segiddins@segiddins.me> | 2016-07-27 12:07:11 -0500 |
|---|---|---|
| committer | Samuel Giddins <segiddins@segiddins.me> | 2016-08-02 15:04:28 -0500 |
| commit | c607f20d7d200c18cc26edb1346dda847cc4331e (patch) | |
| tree | acf0e680184455241cfea3104a48f6c81ff316d0 /spec/cache | |
| parent | 52285c7cefc0daaa99784945a7bc119102f68944 (diff) | |
| download | bundler-c607f20d7d200c18cc26edb1346dda847cc4331e.tar.gz | |
[Matchers] Add TheBundle class to make custom matchers more fluent
Diffstat (limited to 'spec/cache')
| -rw-r--r-- | spec/cache/gems_spec.rb | 16 | ||||
| -rw-r--r-- | spec/cache/git_spec.rb | 8 | ||||
| -rw-r--r-- | spec/cache/path_spec.rb | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/spec/cache/gems_spec.rb b/spec/cache/gems_spec.rb index a1bb8751dd..ad175fe2e3 100644 --- a/spec/cache/gems_spec.rb +++ b/spec/cache/gems_spec.rb @@ -24,14 +24,14 @@ describe "bundle cache" do gem "omg" G - should_be_installed "omg 1.0.0" + expect(the_bundle).to have_installed "omg 1.0.0" end it "uses the cache as a source when installing gems with --local" do system_gems [] bundle "install --local" - should_be_installed("rack 1.0.0") + expect(the_bundle).to have_installed("rack 1.0.0") end it "does not reinstall gems from the cache if they exist on the system" do @@ -43,7 +43,7 @@ describe "bundle cache" do gem "rack" G - should_be_installed("rack 1.0.0") + expect(the_bundle).to have_installed("rack 1.0.0") end it "does not reinstall gems from the cache if they exist in the bundle" do @@ -58,7 +58,7 @@ describe "bundle cache" do end bundle "install --local" - should_be_installed("rack 1.0.0") + expect(the_bundle).to have_installed("rack 1.0.0") end it "creates a lockfile" do @@ -89,7 +89,7 @@ describe "bundle cache" do it "uses builtin gems" do install_gemfile %(gem 'builtin_gem', '1.0.2') - should_be_installed("builtin_gem 1.0.2") + expect(the_bundle).to have_installed("builtin_gem 1.0.2") end it "caches remote and builtin gems" do @@ -115,7 +115,7 @@ describe "bundle cache" do G bundle "install --local" - should_be_installed("builtin_gem_2 1.0.2") + expect(the_bundle).to have_installed("builtin_gem_2 1.0.2") end it "errors if the builtin gem isn't available to cache" do @@ -149,7 +149,7 @@ describe "bundle cache" do system_gems [] bundle "install --local" - should_be_installed("rack 1.0.0", "foo 1.0") + expect(the_bundle).to have_installed("rack 1.0.0", "foo 1.0") end it "should not explode if the lockfile is not present" do @@ -286,7 +286,7 @@ describe "bundle cache" do gem "foo-bundler" G - should_be_installed "foo-bundler 1.0" + expect(the_bundle).to have_installed "foo-bundler 1.0" end end end diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb index df77e39cb8..89d4b5c74d 100644 --- a/spec/cache/git_spec.rb +++ b/spec/cache/git_spec.rb @@ -29,7 +29,7 @@ end expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.bundlecache")).to be_file FileUtils.rm_rf lib_path("foo-1.0") - should_be_installed "foo 1.0" + expect(the_bundle).to have_installed "foo 1.0" end it "copies repository to vendor cache and uses it even when installed with bundle --path" do @@ -47,7 +47,7 @@ end expect(bundled_app("vendor/cache/foo-1.0-#{ref}/.git")).not_to exist FileUtils.rm_rf lib_path("foo-1.0") - should_be_installed "foo 1.0" + expect(the_bundle).to have_installed "foo 1.0" end it "runs twice without exploding" do @@ -62,7 +62,7 @@ end expect(err).to lack_errors FileUtils.rm_rf lib_path("foo-1.0") - should_be_installed "foo 1.0" + expect(the_bundle).to have_installed "foo 1.0" end it "tracks updates" do @@ -139,7 +139,7 @@ end expect(bundled_app("vendor/cache/has_submodule-1.0-#{ref}")).to exist expect(bundled_app("vendor/cache/has_submodule-1.0-#{ref}/submodule-1.0")).to exist - should_be_installed "has_submodule 1.0" + expect(the_bundle).to have_installed "has_submodule 1.0" end it "displays warning message when detecting git repo in Gemfile" do diff --git a/spec/cache/path_spec.rb b/spec/cache/path_spec.rb index b81768102a..72b12948f4 100644 --- a/spec/cache/path_spec.rb +++ b/spec/cache/path_spec.rb @@ -12,7 +12,7 @@ require "spec_helper" bundle "#{cmd} --all" expect(bundled_app("vendor/cache/foo-1.0")).not_to exist - should_be_installed "foo 1.0" + expect(the_bundle).to have_installed "foo 1.0" end it "copies when the path is outside the bundle " do @@ -27,7 +27,7 @@ require "spec_helper" expect(bundled_app("vendor/cache/foo-1.0/.bundlecache")).to be_file FileUtils.rm_rf lib_path("foo-1.0") - should_be_installed "foo 1.0" + expect(the_bundle).to have_installed "foo 1.0" end it "copies when the path is outside the bundle and the paths intersect" do @@ -45,7 +45,7 @@ require "spec_helper" expect(bundled_app("vendor/cache/#{libname}/.bundlecache")).to be_file FileUtils.rm_rf libpath - should_be_installed "#{libname} 1.0" + expect(the_bundle).to have_installed "#{libname} 1.0" end it "updates the path on each cache" do |
