diff options
author | Terence Lee <hone02@gmail.com> | 2012-10-09 16:50:55 -1000 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2012-10-09 16:51:54 -1000 |
commit | 944a78293b0bc0f508a70ee99530d251297c5bcc (patch) | |
tree | 241595f7f787339e934b1c89cda83a287faa1c3b /spec/support | |
parent | 3fa809a13eeded67b1e8b3e421071f40c1f4b8f4 (diff) | |
download | bundler-944a78293b0bc0f508a70ee99530d251297c5bcc.tar.gz |
change to new expect syntax for rspec
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/indexes.rb | 6 | ||||
-rw-r--r-- | spec/support/matchers.rb | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/spec/support/indexes.rb b/spec/support/indexes.rb index f33501c8..ece7fd04 100644 --- a/spec/support/indexes.rb +++ b/spec/support/indexes.rb @@ -26,7 +26,7 @@ module Spec def should_resolve_as(specs) got = resolve got = got.map { |s| s.full_name }.sort - got.should == specs.sort + expect(got).to eq(specs.sort) end def should_conflict_on(names) @@ -34,7 +34,7 @@ module Spec got = resolve flunk "The resolve succeeded with: #{got.map { |s| s.full_name }.sort.inspect}" rescue Bundler::VersionConflict => e - Array(names).sort.should == e.conflicts.sort + expect(Array(names).sort).to eq(e.conflicts.sort) end end @@ -109,4 +109,4 @@ module Spec end end end -end
\ No newline at end of file +end diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index 361a0330..e42c67be 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -35,8 +35,8 @@ 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+/) - Gem::Version.new(actual_version).should eq(Gem::Version.new(version)) - actual_platform.should == platform + expect(Gem::Version.new(actual_version)).to eq(Gem::Version.new(version)) + expect(actual_platform).to eq(platform) end end @@ -56,22 +56,22 @@ module Spec end R if version.nil? || out == "WIN" - out.should == "WIN" + expect(out).to eq("WIN") else - Gem::Version.new(out).should_not == Gem::Version.new(version) + expect(Gem::Version.new(out)).not_to eq(Gem::Version.new(version)) end end end def should_be_locked - bundled_app("Gemfile.lock").should exist + expect(bundled_app("Gemfile.lock")).to exist end def lockfile_should_be(expected) should_be_locked spaces = expected[/\A\s+/, 0] || "" expected.gsub!(/^#{spaces}/, '') - bundled_app("Gemfile.lock").read.should == expected + expect(bundled_app("Gemfile.lock").read).to eq(expected) end end end |