Skip to content

Commit

Permalink
Adjust specs to work with latest RSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksieger committed Nov 19, 2008
1 parent fb3aaa9 commit a3f50d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions spec/warbler/gems_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@
describe Warbler::Gems do
it "should accept a hash for initialization" do
gems = Warbler::Gems.new({"actionpack" => "1.2.3"})
gems.should include("actionpack")
gems.should have_key("actionpack")
gems["actionpack"].should == "1.2.3"
end

it "should accept an array for initialization" do
gems = Warbler::Gems.new ["activerecord"]
gems.should include("activerecord")
gems.should have_key("activerecord")
end

it "should allow gems with a version" do
gems = Warbler::Gems.new
gems["actionpack"] = "> 1.2.3"
gems["actionpack"].should == "> 1.2.3"
end

it "should allow gems without an explicit version" do
gems = Warbler::Gems.new
gems << "actionpack"
gems.should include("actionpack")
end
gems.should have_key("actionpack")
end

it "should allow to add gems" do
gems = Warbler::Gems.new
gems << "rails"
gems += ["activerecord-jdbcmysql-adapter", "jdbc-mysql", "jruby-openssl"]
gems.should include("rails", "activerecord-jdbcmysql-adapter", "jdbc-mysql", "jruby-openssl")
["rails", "activerecord-jdbcmysql-adapter", "jdbc-mysql", "jruby-openssl"].each {|g| gems.should have_key(g)}
end
end
2 changes: 1 addition & 1 deletion spec/warbler/task_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def mock_rails_module
end

config = Warbler::Config.new
config.gems.should include("rails")
config.gems.should have_key("rails")

mkdir_p "vendor/rails"
config = Warbler::Config.new
Expand Down

0 comments on commit a3f50d1

Please sign in to comment.