summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2011-05-24 09:07:44 -0700
committerAndre Arko <andre@arko.net>2011-05-24 09:07:53 -0700
commit322321e9f71c0b5ffdb703ad4e5c29b403ed4682 (patch)
tree41831c47a2e2585af98eb3b0b71f718fb980079c /spec
parent5711953c1892e6684b2f2cff5d3fbe87397545d0 (diff)
downloadbundler-322321e9f71c0b5ffdb703ad4e5c29b403ed4682.tar.gz
un-check everything
Diffstat (limited to 'spec')
-rw-r--r--spec/install/deploy_spec.rb2
-rw-r--r--spec/install/gems/groups_spec.rb4
-rw-r--r--spec/install/gems/sudo_spec.rb4
-rw-r--r--spec/install/git_spec.rb2
-rw-r--r--spec/install/path_spec.rb2
-rw-r--r--spec/other/check_spec.rb12
-rw-r--r--spec/other/exec_spec.rb8
-rw-r--r--spec/other/init_spec.rb6
-rw-r--r--spec/quality_spec.rb2
-rw-r--r--spec/runtime/require_spec.rb20
-rw-r--r--spec/spec_helper.rb5
-rw-r--r--spec/support/matchers.rb2
-rw-r--r--spec/update/git_spec.rb4
13 files changed, 34 insertions, 39 deletions
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb
index 6e104cd229..5678e4cced 100644
--- a/spec/install/deploy_spec.rb
+++ b/spec/install/deploy_spec.rb
@@ -21,7 +21,7 @@ describe "install with --deployment or --frozen" do
it "works after you try to deploy without a lock" do
bundle "install --deployment"
bundle :install, :exitstatus => true
- check exitstatus.should == 0
+ exitstatus.should eq(0)
should_be_installed "rack 1.0"
end
diff --git a/spec/install/gems/groups_spec.rb b/spec/install/gems/groups_spec.rb
index c667114e02..5148a8761b 100644
--- a/spec/install/gems/groups_spec.rb
+++ b/spec/install/gems/groups_spec.rb
@@ -35,10 +35,10 @@ describe "bundle install with gem sources" do
it "sets up everything if Bundler.setup is used with no groups" do
out = run("require 'rack'; puts RACK")
- check out.should == '1.0.0'
+ out.should eq('1.0.0')
out = run("require 'activesupport'; puts ACTIVESUPPORT")
- check out.should == '2.3.5'
+ out.should == eq('2.3.5')
out = run("require 'thin'; puts THIN")
out.should == '1.0'
diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb
index 44b0ba2598..c86bbc5856 100644
--- a/spec/install/gems/sudo_spec.rb
+++ b/spec/install/gems/sudo_spec.rb
@@ -13,7 +13,7 @@ describe "when using sudo", :sudo => true do
G
system_gem_path("gems/rack-1.0.0").should exist
- check system_gem_path("gems/rack-1.0.0").stat.uid.should == 0
+ system_gem_path("gems/rack-1.0.0").stat.uid.should eq(0)
should_be_installed "rack 1.0"
end
@@ -29,7 +29,7 @@ describe "when using sudo", :sudo => true do
G
bundle_path.join("gems/rack-1.0.0").should exist
- check bundle_path.join("gems/rack-1.0.0").stat.uid.should == 0
+ bundle_path.join("gems/rack-1.0.0").stat.uid.should eq(0)
should_be_installed "rack 1.0"
end
diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb
index 6a92b5efec..3fd3cf7988 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/git_spec.rb
@@ -145,7 +145,7 @@ describe "bundle install with git sources" do
gem "foo"
end
G
- check err.should == ""
+ err.should eq("")
run <<-RUBY
require 'foo'
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb
index ad622cad51..8b778d4efe 100644
--- a/spec/install/path_spec.rb
+++ b/spec/install/path_spec.rb
@@ -191,7 +191,7 @@ describe "bundle install with explicit source paths" do
gemspec :path => "#{lib_path("foo")}"
G
- check exitstatus.should == 15
+ exitstatus.should eq(15)
out.should =~ /There are multiple gemspecs/
end
diff --git a/spec/other/check_spec.rb b/spec/other/check_spec.rb
index 519ecc15c3..7cb7eb6a2a 100644
--- a/spec/other/check_spec.rb
+++ b/spec/other/check_spec.rb
@@ -8,7 +8,7 @@ describe "bundle check" do
G
bundle :check, :exitstatus => true
- check @exitstatus.should == 0
+ @exitstatus.should eq(0)
out.should == "The Gemfile's dependencies are satisfied"
end
@@ -55,7 +55,7 @@ describe "bundle check" do
G
bundle :check, :exitstatus => true
- check @exitstatus.should > 0
+ @exitstatus.should be > 0
out.should include("could not be satisfied")
end
@@ -89,7 +89,7 @@ describe "bundle check" do
bundle "install --without foo"
bundle "check", :exitstatus => true
- check @exitstatus.should == 0
+ @exitstatus.should eq(0)
out.should include("The Gemfile's dependencies are satisfied")
end
@@ -175,7 +175,7 @@ describe "bundle check" do
it "outputs an error when the default Gemfile is not found" do
bundle :check, :exitstatus => true
- check @exitstatus.should == 10
+ @exitstatus.should eq(10)
out.should include("Could not locate Gemfile")
end
@@ -190,7 +190,7 @@ describe "bundle check" do
last_out = out
3.times do |i|
bundle :check
- check out.should == last_out
+ out.should eq(last_out)
err.should be_empty
end
end
@@ -207,7 +207,7 @@ describe "bundle check" do
it "returns success when the Gemfile is satisfied" do
bundle :install
bundle :check, :exitstatus => true
- check @exitstatus.should == 0
+ @exitstatus.should eq(0)
out.should == "The Gemfile's dependencies are satisfied"
end
diff --git a/spec/other/exec_spec.rb b/spec/other/exec_spec.rb
index 6bafd5e6ea..8f38824bf5 100644
--- a/spec/other/exec_spec.rb
+++ b/spec/other/exec_spec.rb
@@ -54,7 +54,7 @@ describe "bundle exec" do
bundle "exec rackup"
- check out.should == "0.9.1"
+ out.should eq("0.9.1")
Dir.chdir bundled_app2 do
bundle "exec rackup"
@@ -74,7 +74,7 @@ describe "bundle exec" do
bundle "exec rackup"
- check out.should == "0.9.1"
+ out.should eq("0.9.1")
should_not_be_installed "rack_middleware 1.0"
end
@@ -99,7 +99,7 @@ describe "bundle exec" do
G
bundle "exec foobarbaz", :exitstatus => true
- check exitstatus.should == 127
+ exitstatus.should eq(127)
out.should include("bundler: command not found: foobarbaz")
out.should include("Install missing gem binaries with `bundle install`")
end
@@ -111,7 +111,7 @@ describe "bundle exec" do
bundle "exec touch foo"
bundle "exec ./foo", :exitstatus => true
- check exitstatus.should == 126
+ exitstatus.should eq(126)
out.should include("bundler: not executable: ./foo")
end
diff --git a/spec/other/init_spec.rb b/spec/other/init_spec.rb
index 6b380e15c0..0b9f447021 100644
--- a/spec/other/init_spec.rb
+++ b/spec/other/init_spec.rb
@@ -32,9 +32,9 @@ describe "bundle init" do
gemfile = bundled_app("Gemfile").read
gemfile.should =~ /source :gemcutter/
- check gemfile.scan(/gem "rack", "= 1.0.1"/).size.should == 1
- check gemfile.scan(/gem "rspec", "= 1.2"/).size.should == 1
- check gemfile.scan(/group :development/).size.should == 1
+ gemfile.scan(/gem "rack", "= 1.0.1"/).size.should eq(1)
+ gemfile.scan(/gem "rspec", "= 1.2"/).size.should eq(1)
+ gemfile.scan(/group :development/).size.should eq(1)
end
end \ No newline at end of file
diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb
index 1e6ebb0dee..9b84be4bce 100644
--- a/spec/quality_spec.rb
+++ b/spec/quality_spec.rb
@@ -49,7 +49,7 @@ describe "The library itself" do
it "can still be built" do
Dir.chdir(root) do
`gem build bundler.gemspec`
- check $?.should == 0
+ $?.should eq(0)
# clean up the .gem generated
system("rm bundler-#{Bundler::VERSION}.gem")
diff --git a/spec/runtime/require_spec.rb b/spec/runtime/require_spec.rb
index bb366175bc..2f3a515d42 100644
--- a/spec/runtime/require_spec.rb
+++ b/spec/runtime/require_spec.rb
@@ -48,23 +48,23 @@ describe "Bundler.require" do
it "requires the gems" do
# default group
run "Bundler.require"
- check out.should == "two"
+ out.should eq("two")
# specific group
run "Bundler.require(:bar)"
- check out.should == "baz\nqux"
+ out.should eq("baz\nqux")
# default and specific group
run "Bundler.require(:default, :bar)"
- check out.should == "baz\nqux\ntwo"
+ out.should eq("baz\nqux\ntwo")
# specific group given as a string
run "Bundler.require('bar')"
- check out.should == "baz\nqux"
+ out.should eq("baz\nqux")
# specific group declared as a string
run "Bundler.require(:string)"
- check out.should == "six"
+ out.should eq("six")
# required in resolver order instead of gemfile order
run("Bundler.require(:not)")
@@ -95,10 +95,10 @@ describe "Bundler.require" do
describe "using bundle exec" do
it "requires the locked gems" do
bundle "exec ruby -e 'Bundler.require'"
- check out.should == "two"
+ out.should eq("two")
bundle "exec ruby -e 'Bundler.require(:bar)'"
- check out.should == "baz\nqux"
+ out.should eq("baz\nqux")
bundle "exec ruby -e 'Bundler.require(:default, :bar)'"
out.should == "baz\nqux\ntwo"
@@ -138,7 +138,7 @@ describe "Bundler.require" do
G
run "Bundler.require"
- check out.should == "two\nmodule_two\none"
+ out.should eq("two\nmodule_two\none")
end
describe "a gem with different requires for different envs" do
@@ -178,7 +178,7 @@ describe "Bundler.require" do
G
run "Bundler.require"
- check out.should == "two_not_loaded\none\ntwo"
+ out.should eq("two_not_loaded\none\ntwo")
end
describe "with busted gems" do
@@ -225,7 +225,7 @@ describe "Bundler.require with platform specific dependencies" do
run "Bundler.require; puts RACK", :expect_err => true
- check out.should == "1.0.0"
+ out.should eq("1.0.0")
err.should be_empty
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 77554b9f34..fc7ccebf20 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -57,11 +57,6 @@ RSpec.configure do |config|
pending "JRuby executables do not have a proper shebang" if RUBY_PLATFORM == "java"
end
- def check(*args)
- # suppresses ruby warnings about "useless use of == in void context"
- # e.g. check foo.should == bar
- end
-
config.before :all do
build_repo1
end
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
index be6837fc82..361a03304e 100644
--- a/spec/support/matchers.rb
+++ b/spec/support/matchers.rb
@@ -35,7 +35,7 @@ module Spec
version_const = name == 'bundler' ? 'Bundler::VERSION' : Spec::Builders.constantize(name)
run "require '#{name}.rb'; puts #{version_const}", *groups
actual_version, actual_platform = out.split(/\s+/)
- check Gem::Version.new(actual_version).should == Gem::Version.new(version)
+ Gem::Version.new(actual_version).should eq(Gem::Version.new(version))
actual_platform.should == platform
end
end
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb
index 674fa79b07..cd15b5c568 100644
--- a/spec/update/git_spec.rb
+++ b/spec/update/git_spec.rb
@@ -145,7 +145,7 @@ describe "bundle update" do
G
run "require 'submodule'"
- check out.should == 'GEM'
+ out.should eq('GEM')
install_gemfile <<-G
git "#{lib_path('has_submodule-1.0')}", :submodules => true do
@@ -166,7 +166,7 @@ describe "bundle update" do
G
run "require 'submodule'"
- check out.should == 'GIT'
+ out.should eq('GIT')
install_gemfile <<-G
git "#{lib_path('has_submodule-1.0')}" do