Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update to latest beta of Rails and RSpec

  • Loading branch information...
commit 682b1b9bebc04c8a11c080cf2427296629cc2d50 1 parent ee5a295
@tomeric tomeric authored
View
0  spec/spec.opts → .rspec
File renamed without changes
View
6 Gemfile
@@ -1,6 +1,6 @@
source :gemcutter
# Rails 3.0
-gem 'rails', '3.0.0.beta2'
-gem 'rspec', '2.0.0.beta.5'
-gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
+gem 'rails', '3.0.0.beta3'
+gem 'rspec', '2.0.0.beta.8'
+gem 'sqlite3-ruby', :require => 'sqlite3'
View
2  spec/acts_as_taggable_on/acts_as_taggable_on_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe "Acts As Taggable On" do
before(:each) do
View
6 spec/acts_as_taggable_on/acts_as_tagger_spec.rb
@@ -1,11 +1,11 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe "acts_as_tagger" do
before(:each) do
clean_database!
end
- context "Tagger Method Generation" do
+ describe "Tagger Method Generation" do
before(:each) do
@tagger = TaggableUser.new()
end
@@ -84,7 +84,7 @@
end
end
- context "when called by multiple tagger's" do
+ describe "when called by multiple tagger's" do
before(:each) do
@user_x = TaggableUser.create(:name => "User X")
@user_y = TaggableUser.create(:name => "User Y")
View
2  spec/acts_as_taggable_on/tag_list_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe TagList do
before(:each) do
View
2  spec/acts_as_taggable_on/tag_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe Tag do
before(:each) do
View
2  spec/acts_as_taggable_on/taggable_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe "Taggable" do
before(:each) do
View
2  spec/acts_as_taggable_on/tagger_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe "Tagger" do
before(:each) do
View
2  spec/acts_as_taggable_on/tagging_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe Tagging do
before(:each) do
View
2  spec/acts_as_taggable_on/tags_helper_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe TagsHelper do
before(:each) do
View
36 spec/spec_helper.rb
@@ -1,27 +1,31 @@
+$LOAD_PATH << "." unless $LOAD_PATH.include?(".")
+
begin
- # Try to require the preresolved locked set of gems.
- require File.expand_path("../.bundle/environment", __FILE__)
-rescue LoadError
- # Fall back on doing an unlocked resolve at runtime.
- require "rubygems" unless RUBY_VERSION >= "1.9"
+ require "rubygems"
require "bundler"
+
+ if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.5")
+ raise RuntimeError, "Your bundler version is too old." +
+ "Run `gem install bundler` to upgrade."
+ end
+
+ # Set up load paths for all bundled gems
Bundler.setup
+rescue Bundler::GemNotFound
+ raise RuntimeError, "Bundler couldn't find some gems." +
+ "Did you run `bundle install`?"
end
Bundler.require
require File.expand_path('../../lib/acts-as-taggable-on', __FILE__)
-if defined?(Rspec::Core::ExampleGroupSubject)
- module Rspec::Core::ExampleGroupSubject
- alias :context :describe
- end
-end
-
-class Array
- def freq
- k=Hash.new(0)
- each {|e| k[e]+=1}
- k
+unless [].respond_to?(:freq)
+ class Array
+ def freq
+ k=Hash.new(0)
+ each {|e| k[e]+=1}
+ k
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.