Permalink
Browse files

upgrade to RSpec 2

  • Loading branch information...
1 parent 4d5ebf5 commit 10398b7a8516ca3767abadf320e3d1496b7d22a4 @jnicklas jnicklas committed May 18, 2011
Showing with 8 additions and 11 deletions.
  1. +3 −4 Rakefile
  2. +1 −1 carrierwave.gemspec
  3. +1 −1 features/support/env.rb
  4. +1 −1 spec/mount_spec.rb
  5. +1 −3 spec/sanitized_file_spec.rb
  6. +1 −1 spec/spec_helper.rb
View
@@ -10,19 +10,18 @@ require 'bundler'
Bundler::GemHelper.install_tasks
require 'rake'
-require 'spec/rake/spectask'
+require 'rspec/core/rake_task'
require 'cucumber'
require 'cucumber/rake/task'
desc "Run all examples"
-Spec::Rake::SpecTask.new('spec') do |t|
- t.spec_files = FileList['spec/**/*.rb']
+RSpec::Core::RakeTask.new(:spec) do |t|
+ t.rspec_opts = %w[--color]
end
desc "Run cucumber features"
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "features --format progress"
end
-
task :default => [:spec, :features]
View
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.add_dependency("activesupport", ["~> 3.0"])
s.add_development_dependency "rails", ["3.0.5"]
- s.add_development_dependency "rspec", ["1.3.0"]
+ s.add_development_dependency "rspec", ["~> 2.0"]
s.add_development_dependency "excon"
s.add_development_dependency "fog"
s.add_development_dependency "cucumber"
View
@@ -5,7 +5,7 @@
require File.join(File.dirname(__FILE__), 'activerecord')
require File.join(File.dirname(__FILE__), 'datamapper')
-require 'spec'
+require 'rspec'
require 'carrierwave'
require 'sham_rack'
View
@@ -513,7 +513,7 @@ def monkey
describe '#image' do
it "should retrieve a file from the storage if a value is stored in the database" do
- @instance.should_receive(:read_uploader).at_least(:once).with(:monkey).twice.and_return('test.jpg')
+ @instance.should_receive(:read_uploader).at_least(:once).with(:monkey).and_return('test.jpg')
@instance.image.should be_an_instance_of(@uploader)
@instance.image.current_path.should == public_path('uploads/test.jpg')
end
@@ -5,9 +5,7 @@
describe CarrierWave::SanitizedFile do
before do
- unless File.exists?(file_path('llama.jpg'))
- FileUtils.cp(file_path('test.jpg'), file_path('llama.jpg'))
- end
+ FileUtils.cp(file_path('test.jpg'), file_path('llama.jpg'))
end
after(:all) do
View
@@ -109,7 +109,7 @@ def change_locale_and_store_translations(locale, translations, &block)
end
end
-Spec::Runner.configure do |config|
+RSpec.configure do |config|
config.include CarrierWave::Test::Matchers
config.include CarrierWave::Test::MockFiles
config.include CarrierWave::Test::MockStorage

0 comments on commit 10398b7

Please sign in to comment.